From 57e2046e575c85d5963b108792a28fc166329234 Mon Sep 17 00:00:00 2001 From: Sona Sarmadi Date: Fri, 20 Feb 2015 11:37:37 +0100 Subject: eglibc: CVE-2014-9402 denial of service in getnetbyname getnetbyname function in eglibc 2.21 and earlier will enter an infinite loop if the DNS backend is activated in the system Name Service Switch configuration, and the DNS resolver receives a positive answer while processing the networkname. Reference https://sourceware.org/bugzilla/show_bug.cgi?id=17630 Changes in the NEWS and ChangeLog files from the original upstream commit have been ignored Upstream commit that fixes this issue: https://sourceware.org/git/gitweb.cgi?p=glibc.git; h=11e3417af6e354f1942c68a271ae51e892b2814d Signed-off-by: Sona Sarmadi --- .../CVE-2014-9402_endless-loop-in-getaddr_r.patch | 28 ++++++++++++++++++++++ meta/recipes-core/eglibc/eglibc_2.19.bb | 1 + 2 files changed, 29 insertions(+) create mode 100644 meta/recipes-core/eglibc/eglibc-2.19/CVE-2014-9402_endless-loop-in-getaddr_r.patch diff --git a/meta/recipes-core/eglibc/eglibc-2.19/CVE-2014-9402_endless-loop-in-getaddr_r.patch b/meta/recipes-core/eglibc/eglibc-2.19/CVE-2014-9402_endless-loop-in-getaddr_r.patch new file mode 100644 index 0000000000..f062420d92 --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-2.19/CVE-2014-9402_endless-loop-in-getaddr_r.patch @@ -0,0 +1,28 @@ +eglibc: CVE-2014-9402 endless loop in getaddr_r + +https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commit;h=11e3417af6e354f1942c68a271ae51e892b2814d + +Upstream-Status: Backport + +Signed-off-by: Armin Kuster +Signed-off-by: Sona Sarmadi + +From 11e3417af6e354f1942c68a271ae51e892b2814d Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Mon, 15 Dec 2014 17:41:13 +0100 +Subject: [PATCH] Avoid infinite loop in nss_dns getnetbyname [BZ #17630] + +=================================================================== +--- git.orig/resolv/nss_dns/dns-network.c ++++ git/resolv/nss_dns/dns-network.c +@@ -398,8 +398,8 @@ getanswer_r (const querybuf *answer, int + + case BYNAME: + { +- char **ap = result->n_aliases++; +- while (*ap != NULL) ++ char **ap; ++ for (ap = result->n_aliases; *ap != NULL; ++ap) + { + /* Check each alias name for being of the forms: + 4.3.2.1.in-addr.arpa = net 1.2.3.4 diff --git a/meta/recipes-core/eglibc/eglibc_2.19.bb b/meta/recipes-core/eglibc/eglibc_2.19.bb index 1ef1a429d2..a0c605c7c7 100644 --- a/meta/recipes-core/eglibc/eglibc_2.19.bb +++ b/meta/recipes-core/eglibc/eglibc_2.19.bb @@ -28,6 +28,7 @@ SRC_URI = "http://downloads.yoctoproject.org/releases/eglibc/eglibc-${PV}-svnr25 file://CVE-2014-5119.patch \ file://CVE-2014-7817-wordexp-fails-to-honour-WRDE_NOCMD.patch \ file://CVE-2012-3406-Stack-overflow-in-vfprintf-BZ-16617.patch \ + file://CVE-2014-9402_endless-loop-in-getaddr_r.patch \ " SRC_URI[md5sum] = "197836c2ba42fb146e971222647198dd" SRC_URI[sha256sum] = "baaa030531fc308f7820c46acdf8e1b2f8e3c1f40bcd28b6e440d1c95d170d4c" -- cgit v1.2.3-54-g00ecf