forked from rpms/glibc
9651e7c5de
Upstream commit: fd658f026f25cf59e8db243bc3b3e09cd5a20ba0
nscd is currently not build, so the security fixes below
are not relevant.
- elf: Also compile dl-misc.os with $(rtld-early-cflags)
- CVE-2024-33601, CVE-2024-33602: nscd: netgroup: Use two buffers in addgetnetgrentX (bug 31680)
- CVE-2024-33600: nscd: Avoid null pointer crashes after notfound response (bug 31678)
- CVE-2024-33600: nscd: Do not send missing not-found response in addgetnetgrentX (bug 31678)
- CVE-2024-33599: nscd: Stack-based buffer overflow in netgroup cache (bug 31677)
- x86: Define MINIMUM_X86_ISA_LEVEL in config.h [BZ #31676]
Related: RHEL-31738
- i386: ulp update for SSE2 --disable-multi-arch configurations
- nptl: Fix tst-cancel30 on kernels without ppoll_time64 support
Related: RHEL-35602
Fedora 40 commit: 94914be52f
54 lines
1.9 KiB
Diff
54 lines
1.9 KiB
Diff
commit 5a508e0b508c8ad53bd0d2fb48fd71b242626341
|
|
Author: Florian Weimer <fweimer@redhat.com>
|
|
Date: Thu Apr 25 15:01:07 2024 +0200
|
|
|
|
CVE-2024-33600: nscd: Do not send missing not-found response in addgetnetgrentX (bug 31678)
|
|
|
|
If we failed to add a not-found response to the cache, the dataset
|
|
point can be null, resulting in a null pointer dereference.
|
|
|
|
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
|
|
(cherry picked from commit 7835b00dbce53c3c87bbbb1754a95fb5e58187aa)
|
|
|
|
diff --git a/nscd/netgroupcache.c b/nscd/netgroupcache.c
|
|
index f227dc7fa2856e38..c18fe111f37496d7 100644
|
|
--- a/nscd/netgroupcache.c
|
|
+++ b/nscd/netgroupcache.c
|
|
@@ -147,7 +147,7 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req,
|
|
/* No such service. */
|
|
cacheable = do_notfound (db, fd, req, key, &dataset, &total, &timeout,
|
|
&key_copy);
|
|
- goto writeout;
|
|
+ goto maybe_cache_add;
|
|
}
|
|
|
|
memset (&data, '\0', sizeof (data));
|
|
@@ -348,7 +348,7 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req,
|
|
{
|
|
cacheable = do_notfound (db, fd, req, key, &dataset, &total, &timeout,
|
|
&key_copy);
|
|
- goto writeout;
|
|
+ goto maybe_cache_add;
|
|
}
|
|
|
|
total = buffilled;
|
|
@@ -410,14 +410,12 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req,
|
|
}
|
|
|
|
if (he == NULL && fd != -1)
|
|
- {
|
|
- /* We write the dataset before inserting it to the database
|
|
- since while inserting this thread might block and so would
|
|
- unnecessarily let the receiver wait. */
|
|
- writeout:
|
|
+ /* We write the dataset before inserting it to the database since
|
|
+ while inserting this thread might block and so would
|
|
+ unnecessarily let the receiver wait. */
|
|
writeall (fd, &dataset->resp, dataset->head.recsize);
|
|
- }
|
|
|
|
+ maybe_cache_add:
|
|
if (cacheable)
|
|
{
|
|
/* If necessary, we also propagate the data to disk. */
|