From: Florian Weimer Date: Thu, 2 May 2024 15:06:19 +0000 (+0200) Subject: nscd: Use time_t for return type of addgetnetgrentX X-Git-Tag: archive/raspbian/2.28-10+rpi1+deb10u4^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=56314541fe03bb0568a9c48ce1a20eb1689c57f0;p=glibc.git 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 Gbp-Pq: Topic all Gbp-Pq: Name git-0005-nscd-Use-time_t-for-return-type-of-addgetnetgrentX.patch --- diff --git a/nscd/netgroupcache.c b/nscd/netgroupcache.c index 8d097c54e..5a47faaad 100644 --- a/nscd/netgroupcache.c +++ b/nscd/netgroupcache.c @@ -681,8 +681,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;