[Dovecot] Regression in settings-parser.c (dovecot 2.0.11)

Timo Sirainen tss at iki.fi
Sat Mar 26 01:02:04 EET 2011


On Fri, 2011-03-25 at 09:57 +0100, Michal Hlavinka wrote:
> Hi,
> 
> one Fedora user sees regression in dovecot 2.0.11 (compared to prev. 2.0.9). There was change recently:
> http://hg.dovecot.org/dovecot-2.0/diff/bc77e80947c0/src/lib-settings/settings-parser.c
> which adds call to settings_find_key_nth(...., &parent_def,...). This function can set parent_def to NULL, but
> there is no check for this situation in the code. So on next line if (parent_def->type !=... dovecot crashes.
> We've tested simple fix: if (parent_def==NULL) return FALSE; and everything was working again.

Well, yes, there is a bug. But how is this happening?

> #3  0x004f94fd in settings_parse_keyvalue (ctx=0x99e4050, 
>     key=0x99c42f8 "plugin//etc/dovecot/users", value=0x99c42f2 "yes")

Where is this "plugin//etc/dovecot/users=yes" coming from? Is it from a
userdb lookup that returns a broken setting? If Dovecot is somehow
internally setting this, there's a bug somewhere.




More information about the dovecot mailing list