From d92c06ddc2bb66673c4fa94d19467ae97746f5f7 Mon Sep 17 00:00:00 2001 From: Sona Sarmadi Date: Tue, 5 Jan 2016 13:33:15 +0100 Subject: kernel-ipv4: CVE-2015-3636 Fixes use-after-free leading to local privilege escalation. Reference: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-3636 Upstream fix: https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/ patch/?id=f493b53864236c924b61ef3ccbb759ac46419a32 Signed-off-by: Sona Sarmadi Signed-off-by: Tudor Florea --- .../linux/files/ipv4-CVE-2015-3636.patch | 38 ++++++++++++++++++++++ recipes-kernel/linux/linux-yocto_3.14.bbappend | 1 + 2 files changed, 39 insertions(+) create mode 100644 recipes-kernel/linux/files/ipv4-CVE-2015-3636.patch diff --git a/recipes-kernel/linux/files/ipv4-CVE-2015-3636.patch b/recipes-kernel/linux/files/ipv4-CVE-2015-3636.patch new file mode 100644 index 0000000..ae1f4eb --- /dev/null +++ b/recipes-kernel/linux/files/ipv4-CVE-2015-3636.patch @@ -0,0 +1,38 @@ +From f493b53864236c924b61ef3ccbb759ac46419a32 Mon Sep 17 00:00:00 2001 +From: "David S. Miller" +Subject: ipv4: Missing sk_nulls_node_init() in ping_unhash(). + +[ Upstream commit a134f083e79fb4c3d0a925691e732c56911b4326 ] + +If we don't do that, then the poison value is left in the ->pprev +backlink. + +This can cause crashes if we do a disconnect, followed by a connect(). + +Fixes CVE-2015-3636 +Upstream-Status: Backport + +Tested-by: Linus Torvalds +Reported-by: Wen Xu +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Sona Sarmadi +--- + net/ipv4/ping.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c +index b94002a..1e2e9bf 100644 +--- a/net/ipv4/ping.c ++++ b/net/ipv4/ping.c +@@ -158,6 +158,7 @@ void ping_unhash(struct sock *sk) + if (sk_hashed(sk)) { + write_lock_bh(&ping_table.lock); + hlist_nulls_del(&sk->sk_nulls_node); ++ sk_nulls_node_init(&sk->sk_nulls_node); + sock_put(sk); + isk->inet_num = 0; + isk->inet_sport = 0; +-- +cgit v0.11.2 + diff --git a/recipes-kernel/linux/linux-yocto_3.14.bbappend b/recipes-kernel/linux/linux-yocto_3.14.bbappend index 7037182..ebf515d 100644 --- a/recipes-kernel/linux/linux-yocto_3.14.bbappend +++ b/recipes-kernel/linux/linux-yocto_3.14.bbappend @@ -14,4 +14,5 @@ SRC_URI += "file://HID_CVE_patches/0005-HID-steelseries-validate-output-report-d file://ipv4-CVE-2015-1465.patch \ file://net-rds-CVE-2015-2042.patch \ file://ipv6-CVE-2015-2922.patch \ + file://ipv4-CVE-2015-3636.patch \ " -- cgit v1.2.3-54-g00ecf