Skip to content
Commit 8d794918 authored by Florian Weimer's avatar Florian Weimer
Browse files

CVE-2024-33600: nscd: Avoid null pointer crashes after notfound response (bug 31678)



The addgetnetgrentX call in addinnetgrX may have failed to produce
a result, so the result variable in addinnetgrX can be NULL.
Use db->negtimeout as the fallback value if there is no result data;
the timeout is also overwritten below.

Also avoid sending a second not-found response.  (The client
disconnects after receiving the first response, so the data stream did
not go out of sync even without this fix.)  It is still beneficial to
add the negative response to the mapping, so that the client can get
it from there in the future, instead of going through the socket.

Reviewed-by: default avatarSiddhesh Poyarekar <siddhesh@sourceware.org>
(cherry picked from commit b048a482)
parent 304ce5fe
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment