]> code.ossystems Code Review - openembedded-core.git/commitdiff
uclibc: Security fix CVE-2016-2225
authorArmin Kuster <akuster@mvista.com>
Wed, 10 Feb 2016 23:46:01 +0000 (15:46 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 21 Feb 2016 09:37:22 +0000 (09:37 +0000)
CVE-2016-2225 Make sure to always terminate decoded string

This change is being provide to comply to Yocto compatiblility.

Signed-off-by: Armin Kuster <akuster@mvista.com>
meta/recipes-core/uclibc/uclibc-git.inc
meta/recipes-core/uclibc/uclibc-git/CVE-2016-2225.patch [new file with mode: 0644]

index d3fb2a8a8ecdfd4ebf6ef51dad2622595f97a10f..b7184794d142d48266ffd4dbbfe29eced6429144 100644 (file)
@@ -20,5 +20,6 @@ SRC_URI = "git://uclibc.org/uClibc.git;branch=master \
         file://0001-fcntl-Add-AT_EMPTY_PATH-for-all-and-O_PATH-for-arm.patch \
         file://0001-wire-in-syncfs.patch \
         file://CVE-2016-2224.patch \
+        file://CVE-2016-2225.patch \
 "
 S = "${WORKDIR}/git"
diff --git a/meta/recipes-core/uclibc/uclibc-git/CVE-2016-2225.patch b/meta/recipes-core/uclibc/uclibc-git/CVE-2016-2225.patch
new file mode 100644 (file)
index 0000000..0217e4b
--- /dev/null
@@ -0,0 +1,32 @@
+From bb01edff0377f2585ce304ecbadcb7b6cde372ac Mon Sep 17 00:00:00 2001
+From: Waldemar Brodkorb <wbx@openadk.org>
+Date: Mon, 25 Jan 2016 21:11:34 +0100
+Subject: [PATCH] Make sure to always terminate decoded string
+
+Write a terminating '\0' to dest when the first byte of the encoded data
+is 0. This corner case was previously missed.
+
+Signed-off-by: Daniel Fahlgren <daniel@fahlgren.se>
+Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
+
+Upstream-Status: Backport
+http://repo.or.cz/uclibc-ng.git/commit/bb01edff0377f2585ce304ecbadcb7b6cde372ac
+CVE: CVE-2016-2225
+Signed-off-by: Armin Kuster <akuster@mvista.com>
+
+---
+ libc/inet/resolv.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+Index: git/libc/inet/resolv.c
+===================================================================
+--- git.orig/libc/inet/resolv.c
++++ git/libc/inet/resolv.c
+@@ -671,6 +671,7 @@ int __decode_dotted(const unsigned char
+       if (!packet)
+               return -1;
++      dest[0] = '\0';
+       while (--maxiter) {
+               if (offset >= packet_len)
+                       return -1;