[SSSD] [PATCH] NSS: Fix off-by-one error in parse_getservbyname

Pavel Březina pbrezina at redhat.com
Wed Sep 12 13:51:22 UTC 2012


On 09/11/2012 05:48 PM, Jakub Hrozek wrote:
> https://fedorahosted.org/sssd/ticket/1438
>
> This off-by-one bug would hit us especially when using the negative
> cache, I guess it was because we would strdup and later retrieve
> something else than intended..
>
> The same bug does not exist in the similar parse_getservbyport function.
>
> I managed to reproduce the bug with by queriying the SSSD for services
> quite fast. The services/protocols were based on data from the crash
> dump:
>
> for s in smtp/dccp  rpcbind/dccp  rpcbind/udplite  rpcbind/sctp
> rpcbind/sctp  47117/udp  rpcbind/dccp; do getent services $s; sleep 1;
> done

Ack.




More information about the sssd-devel mailing list