[PATCH COMMITTED] nss_db: Propagate ERANGE error if parse_line fails [BZ #19837]
Florian Weimer
fweimer@redhat.com
Fri Jan 1 00:00:00 GMT 2016
On 05/09/2016 03:38 PM, Florian Weimer wrote:
> Reproducer (needs to run as root):
>
> perl -e \
> 'print "large:x:999:" . join(",", map {"user$_"} (1 .. 135))."\n"' \
> >> /etc/group
> cd /var/db
> make
> getent -s db group
>
> After the fix, the last command should list the "large" group.
>
> The magic number 135 has been chosen so that the line is shorter than
> 1024 bytes, but the pointers required to encode the member array will
> cross the threshold, triggering the bug.
>
> (cherry picked from commit a6033052d08027f745867e5e346852da1959226c)
>
> 2016-03-29 Florian Weimer <fweimer@redhat.com>
>
> [BZ #19837]
> * nss/nss_db/db-XXX.c (_nss_db_getENTNAME_r): Propagate ERANGE
> error if parse_line fails.
This went into the 2.23 branch.
Florian
More information about the Libc-stable
mailing list