diff options
Diffstat (limited to 'meta/recipes-core/glibc/glibc/CVE-2016-5417.patch')
-rw-r--r-- | meta/recipes-core/glibc/glibc/CVE-2016-5417.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc/CVE-2016-5417.patch b/meta/recipes-core/glibc/glibc/CVE-2016-5417.patch new file mode 100644 index 0000000000..8e0252beb4 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/CVE-2016-5417.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | glibc-2.23: Fix CVE-2016-5417 | ||
2 | |||
3 | [No upstream tracking] -- https://bugzilla.redhat.com/show_bug.cgi?id=1362534 | ||
4 | |||
5 | resolv/res_init.c:Fix resource leak in resolver | ||
6 | |||
7 | The number of currently defined nameservers is stored in ->nscount, | ||
8 | whereas ->_u._ext.nscount is set by __libc_res_nsend only after local | ||
9 | initializations. | ||
10 | |||
11 | Upstream-Status: Backport | ||
12 | CVE: CVE-2016-5417 | ||
13 | Signed-off-by: Andrej Valek <andrej.valek@siemens.com> | ||
14 | Signed-off-by: Pascal Bach <pascal.bach@siemens.com> | ||
15 | |||
16 | diff --git a/resolv/res_init.c b/resolv/res_init.c | ||
17 | index e0b6a80..6c951f5 100644 | ||
18 | --- a/resolv/res_init.c | ||
19 | +++ b/resolv/res_init.c | ||
20 | @@ -594,7 +594,7 @@ __res_iclose(res_state statp, bool free_addr) { | ||
21 | statp->_vcsock = -1; | ||
22 | statp->_flags &= ~(RES_F_VC | RES_F_CONN); | ||
23 | } | ||
24 | - for (ns = 0; ns < statp->_u._ext.nscount; ns++) | ||
25 | + for (ns = 0; ns < statp->nscount; ns++) | ||
26 | if (statp->_u._ext.nsaddrs[ns]) { | ||
27 | if (statp->_u._ext.nssocks[ns] != -1) { | ||
28 | close_not_cancel_no_status(statp->_u._ext.nssocks[ns]); | ||