~ubuntu-branches/ubuntu/trusty/eglibc/trusty-security

« back to all changes in this revision

Viewing changes to debian/patches/any/CVE-2016-3075.diff

  • Committer: Package Import Robot
  • Author(s): Steve Beattie
  • Date: 2016-04-08 23:26:02 UTC
  • Revision ID: package-import@ubuntu.com-20160408232602-694337pzn1m5xgc3
Tags: 2.19-0ubuntu6.8
* SECURITY UPDATE: buffer overflow in gethostbyname_r and related
  functions
  - debian/patches/any/CVE-2015-1781.diff: take alignment padding
    into account when computing if buffer is too small.
  - CVE-2015-1781
* SECURITY UPDATE: glibc Name Service Switch (NSS) denial of sevice
  - debian/patches/any/CVE-2014-8121-1.diff: do not close NSS files
    database during iteration.
  - debian/patches/any/CVE-2014-8121-2.diff: Separate internal state
    between getXXent and getXXbyYY NSS calls.
  - CVE-2014-8121
* SECURITY UPDATE: glibc unbounded stack usage in NaN strtod
  conversion
  - debian/patches/any/CVE-2014-9761-1.diff: Refactor strtod parsing
    of NaN payloads.
  - debian/patches/any/CVE-2014-9761-1.diff:  Fix nan functions
    handling of payload strings
  - CVE-2014-9761
* SECURITY UPDATE: NSS files long line buffer overflow
  - debian/patches/any/CVE-2015-5277.diff: Don't ignore too long
    lines in nss_files
  - CVE-2015-5277
* SECURITY UPDATE: out of range data to strftime() causes segfault
  (denial of service)
  - debian/patches/any/CVE-2015-8776.diff: add range checks to
    strftime() processing
  - CVE-2015-8776
* SECURITY UPDATE: glibc honors LD_POINTER_GUARD env for setuid
  AT_SECURE programs (e.g. setuid), allowing disabling of pointer
  mangling
  - debian/patches/any/CVE-2015-8777.diff: Always enable pointer
    guard
  - CVE-2015-8777
* SECURITY UPDATE: integer overflow in hcreate and hcreate_r
  - debian/patches/any/CVE-2015-8778.diff: check for large inputs
  - CVE-2015-8778
* SECURITY UPDATE: unbounded stack allocation in catopen()
  - debian/patches/any/CVE-2015-8779.diff: stop using unbounded
    alloca()
  - CVE-2015-8779
* SECURITY UPDATE: Stack overflow in _nss_dns_getnetbyname_r
  - debian/patches/any/CVE-2016-3075.diff: do not make unneeded
    memory copy on the stack.
  - CVE-2016-3075
* SECURITY UPDATE: pt_chown privilege escalation
  - debian/patches/any/CVE-2016-2856.diff: grantpt: trust the kernel
    about pty group and permission mode
  - debian/sysdeps/linux.mk: don't build pt_chown
  - debian/rules.d/debhelper.mk: only install pt_chown when built.
  - CVE-2016-2856, CVE-2013-2207
* debian/debhelper.in/libc.postinst: add reboot notifications for
  security updates (LP: #1546457)
* debian/patches/ubuntu/submitted-no-stack-backtrace.diff: update
  patch to eliminate compiler warning.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 #19879]
 
5
 
 
6
The defensive copy is not needed because the name may not alias the
 
7
output buffer.
 
8
 
 
9
        [BZ #19879]
 
10
        CVE-2016-3075
 
11
        * resolv/nss_dns/dns-network.c (_nss_dns_getnetbyname_r): Do not
 
12
        copy name.
 
13
 
 
14
[Note: patch differs from upstream commit in that the entries in
 
15
the Changelog and NEWS were dropped to avoid patch conflicts. -- sbeattie]
 
16
---
 
17
 resolv/nss_dns/dns-network.c |    5 +----
 
18
 1 file changed, 1 insertion(+), 4 deletions(-)
 
19
 
 
20
Index: b/resolv/nss_dns/dns-network.c
 
21
===================================================================
 
22
--- a/resolv/nss_dns/dns-network.c
 
23
+++ b/resolv/nss_dns/dns-network.c
 
24
@@ -118,17 +118,14 @@ _nss_dns_getnetbyname_r (const char *nam
 
25
   } net_buffer;
 
26
   querybuf *orig_net_buffer;
 
27
   int anslen;
 
28
-  char *qbuf;
 
29
   enum nss_status status;
 
30
 
 
31
   if (__res_maybe_init (&_res, 0) == -1)
 
32
     return NSS_STATUS_UNAVAIL;
 
33
 
 
34
-  qbuf = strdupa (name);
 
35
-
 
36
   net_buffer.buf = orig_net_buffer = (querybuf *) alloca (1024);
 
37
 
 
38
-  anslen = __libc_res_nsearch (&_res, qbuf, C_IN, T_PTR, net_buffer.buf->buf,
 
39
+  anslen = __libc_res_nsearch (&_res, name, C_IN, T_PTR, net_buffer.buf->buf,
 
40
                               1024, &net_buffer.ptr, NULL, NULL, NULL, NULL);
 
41
   if (anslen < 0)
 
42
     {