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

Michal Hlavinka mhlavink at redhat.com
Mon Mar 28 09:38:28 EEST 2011


On Saturday, March 26, 2011 01:02:04 Timo Sirainen wrote:
> 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.

User reported he uses original configuration with minimal changes:
"""My configuration differs only slightly from what the RPM delivers. Instead of
using the file auth-system.conf.ext, I use a file with the following content:
passdb {
  driver = passwd-file
  args = username_format=%u /etc/dovecot/users
}
userdb {
  driver = passwd
  args = username_format=%u /etc/dovecot/users
}
"""""



More information about the dovecot mailing list