public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/release/2.36/master] nscd: Use time_t for return type of addgetnetgrentX
@ 2024-05-02 18:54 Florian Weimer
  0 siblings, 0 replies; only message in thread
From: Florian Weimer @ 2024-05-02 18:54 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=ce639236cabfaeb50d98c444d38297ffe70ae9ca

commit ce639236cabfaeb50d98c444d38297ffe70ae9ca
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:
---
 nscd/netgroupcache.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/nscd/netgroupcache.c b/nscd/netgroupcache.c
index aaabbbb003..adc34ba6b4 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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-05-02 18:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-02 18:54 [glibc/release/2.36/master] nscd: Use time_t for return type of addgetnetgrentX Florian Weimer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).