diff options
author | Florian Weimer <fweimer@redhat.com> | 2024-05-02 17:06:19 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2024-05-02 19:02:08 +0200 |
commit | f510d75ff7f7405328853bd67b75f6847dfe9d31 (patch) | |
tree | fb9c94a183016a8a5934d3e2da28f7656602f8c2 | |
parent | e9f05fa1c62c8044ff025963498063f73eb51c5f (diff) | |
download | glibc-f510d75ff7f7405328853bd67b75f6847dfe9d31.tar.gz glibc-f510d75ff7f7405328853bd67b75f6847dfe9d31.tar.xz glibc-f510d75ff7f7405328853bd67b75f6847dfe9d31.zip |
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)
-rw-r--r-- | nscd/netgroupcache.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nscd/netgroupcache.c b/nscd/netgroupcache.c index cc4e270c1f..a63b260fdb 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; |