wok-4.x view glibc/stuff/patches/glibc-2.22-CVE-2016-3075.patch @ rev 12476

Up glibc (2.22) with CVE patchs
author Stanislas Leduc <shann@slitaz.org>
date Wed Mar 15 11:41:38 2023 +0000 (19 months ago)
parents
children
line source
1 From 317b199b4aff8cfa27f2302ab404d2bb5032b9a4 Mon Sep 17 00:00:00 2001
2 From: Florian Weimer <fweimer@redhat.com>
3 Date: Tue, 29 Mar 2016 12:57:56 +0200
4 Subject: [PATCH] CVE-2016-3075: Stack overflow in _nss_dns_getnetbyname_r [BZ
5 #19879]
7 The defensive copy is not needed because the name may not alias the
8 output buffer.
10 diff --git a/resolv/nss_dns/dns-network.c b/resolv/nss_dns/dns-network.c
11 index 2eb2f67..8f301a7 100644
12 --- a/resolv/nss_dns/dns-network.c
13 +++ b/resolv/nss_dns/dns-network.c
14 @@ -118,17 +118,14 @@ _nss_dns_getnetbyname_r (const char *name, struct netent *result,
15 } net_buffer;
16 querybuf *orig_net_buffer;
17 int anslen;
18 - char *qbuf;
19 enum nss_status status;
21 if (__res_maybe_init (&_res, 0) == -1)
22 return NSS_STATUS_UNAVAIL;
24 - qbuf = strdupa (name);
25 -
26 net_buffer.buf = orig_net_buffer = (querybuf *) alloca (1024);
28 - anslen = __libc_res_nsearch (&_res, qbuf, C_IN, T_PTR, net_buffer.buf->buf,
29 + anslen = __libc_res_nsearch (&_res, name, C_IN, T_PTR, net_buffer.buf->buf,
30 1024, &net_buffer.ptr, NULL, NULL, NULL, NULL);
31 if (anslen < 0)
32 {
33 --
34 2.9.3