forked from rpms/glibc
b3097fa24a
Upstream commit: 97bb89668d7171164975f3dc895e38343a2f3a95 - Force DT_RPATH for --enable-hardcoded-path-in-tests - elf: Only process multiple tunable once (BZ 31686) - Add a test to check for duplicate definitions in the static library - i686: Fix multiple definitions of __memmove_chk and __memset_chk - i586: Fix multiple definitions of __memcpy_chk and __mempcpy_chk - time: Allow later version licensing. - nscd: Use time_t for return type of addgetnetgrentX - login: structs utmp, utmpx, lastlog _TIME_BITS independence (bug 30701) - login: Check default sizes of structs utmp, utmpx, lastlog
32 lines
1.1 KiB
Diff
32 lines
1.1 KiB
Diff
commit acc56074b0a5127631a64640aef1b7c5c103ebd8
|
|
Author: Florian Weimer <fweimer@redhat.com>
|
|
Date: Thu May 2 17:06:19 2024 +0200
|
|
|
|
nscd: Use time_t for return type of addgetnetgrentX
|
|
|
|
Using int may give false results for future dates (timeouts after the
|
|
year 2028).
|
|
|
|
Fixes commit 04a21e050d64a1193a6daab872bca2528bda44b ("CVE-2024-33601,
|
|
CVE-2024-33602: nscd: netgroup: Use two buffers in addgetnetgrentX
|
|
(bug 31680)").
|
|
|
|
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
|
|
(cherry picked from commit 4bbca1a44691a6e9adcee5c6798a707b626bc331)
|
|
|
|
diff --git a/nscd/netgroupcache.c b/nscd/netgroupcache.c
|
|
index e8fe041846b75cb9..01d554af9c407739 100644
|
|
--- a/nscd/netgroupcache.c
|
|
+++ b/nscd/netgroupcache.c
|
|
@@ -680,8 +680,8 @@ readdinnetgr (struct database_dyn *db, struct hashentry *he,
|
|
.key_len = he->len
|
|
};
|
|
|
|
- int timeout = addinnetgrX (db, -1, &req, db->data + he->key, he->owner,
|
|
- he, dh);
|
|
+ time_t timeout = addinnetgrX (db, -1, &req, db->data + he->key, he->owner,
|
|
+ he, dh);
|
|
if (timeout < 0)
|
|
timeout = 0;
|
|
return timeout;
|