aboutsummaryrefslogtreecommitdiff
path: root/nscd
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2024-05-02 17:06:19 +0200
committerFlorian Weimer <fweimer@redhat.com>2024-05-02 18:59:29 +0200
commit4bbca1a44691a6e9adcee5c6798a707b626bc331 (patch)
tree35964e8fa9a21e308f2bbf48a7435b681e1f182e /nscd
parentded2e0753e9c46debeb2e0d26c5e560d2581d314 (diff)
downloadglibc-4bbca1a44691a6e9adcee5c6798a707b626bc331.zip
glibc-4bbca1a44691a6e9adcee5c6798a707b626bc331.tar.gz
glibc-4bbca1a44691a6e9adcee5c6798a707b626bc331.tar.bz2
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>
Diffstat (limited to 'nscd')
-rw-r--r--nscd/netgroupcache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nscd/netgroupcache.c b/nscd/netgroupcache.c
index 4b35498..5fdcf42 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;