[SSSD] [PATCH] Guard against invalid DP messages

Sumit Bose sbose at redhat.com
Fri Nov 13 15:16:14 UTC 2015


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.

bye,
Sumit


More information about the sssd-devel mailing list