[SSSD] [PATCH] Guard against invalid DP messages

Jakub Hrozek jhrozek at redhat.com
Sat Nov 14 12:41:38 UTC 2015


On Fri, Nov 13, 2015 at 04:16:14PM +0100, Sumit Bose wrote:
> On Fri, Nov 13, 2015 at 02:56:53PM +0100, Jakub Hrozek wrote:
> > On Fri, Nov 13, 2015 at 02:27:05PM +0100, Sumit Bose wrote:
> > > > +static int sbus_request_valist_check(va_list va, int first_arg_type)
> > > > +{
> > > > +    int ret = EOK;
> > > > +#ifdef HAVE_DBUSBASICVALUE
> > > > +    int type;
> > > > +    va_list va_check;
> > > > +    const DBusBasicValue *value;
> > > > +    bool ok;
> > > > +
> > > > +    va_copy(va_check, va);
> > > > +
> > > > +    type = first_arg_type;
> > > > +    while (type != DBUS_TYPE_INVALID) {
> > > > +        value = va_arg(va_check, const DBusBasicValue*);
> > > > +
> > > > +        if (type == DBUS_TYPE_STRING) {
> > > > +             ok = sss_utf8_check((const uint8_t *) value->str,
> > > > +                                  strlen(value->str));
> > > > +             if (!ok) {
> > > > +                   DEBUG(SSSDBG_MINOR_FAILURE,
> > > > +                         "Back end message [%s] contains invalid non-UTF8 " \
> > > > +                         "characters");
> > > 
> > > value->str is missing, additionally sbus_request_return_and_finish() is
> > > used by the responders as well so 'Back end message' should be changed
> > > to 'S-Bus message' or similar.
> > > 
> > > bye,
> > > Sumit
> > 
> > Oops, sorry..
> 
> ACK.
> 
> CI is still running, but I don't expect any issue, so I needed feel free
> to push them without waiting for the result.

I'm afraid CI is having issues, so I pushed the patches to master:
    * 6b01dae732eedee808f32a9cdd4b5656a9f839c4
    * e8ae3af6724164048a85c374ea8045a368a2d34e
    * 8bc6bc6d87127d615f7a81d7151cb46007feff63
and sssd-1-13:
    * 620b2adf7c19c1b9abc456c37926d77649d262b7
    * 518c003f3d555a525fe3aebf60366e0c0716eff4
    * b51ed15a72a3c8542f3dab72158aeee1d7254341


More information about the sssd-devel mailing list