Skip to contentSkip to conversation

Patch "net/neighbour: fix crash at dumping device-agnostic proxy entries" has been added to the 4.2-stable tree

PATCH [email protected] 1 participant 1 message Dec 11, 2015

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

net/neighbour: fix crash at dumping device-agnostic proxy entries

to the 4.2-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
net-neighbour-fix-crash-at-dumping-device-agnostic-proxy-entries.patch
and it can be found in the queue-4.2 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From foo@baz Fri Dec 11 11:38:35 EST 2015

From: Konstantin Khlebnikov <[email protected]>
Date: Tue, 1 Dec 2015 01:14:48 +0300
Subject: net/neighbour: fix crash at dumping device-agnostic proxy entries

From: Konstantin Khlebnikov <[email protected]>

[ Upstream commit 6adc5fd6a142c6e2c80574c1db0c7c17dedaa42e ]

Proxy entries could have null pointer to net-device.

Fixes 84920c1420e2 ("net: Allow ipv6 proxies and arp proxies be shown with iproute2")
---
 net/core/neighbour.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
net/core/neighbour.c +2 -2
@@ -2210,7 +2210,7 @@ static int pneigh_fill_info(struct sk_bu
 	ndm->ndm_pad2    = 0;
 	ndm->ndm_flags	 = pn->flags | NTF_PROXY;
 	ndm->ndm_type	 = RTN_UNICAST;
-	ndm->ndm_ifindex = pn->dev->ifindex;
+	ndm->ndm_ifindex = pn->dev ? pn->dev->ifindex : 0;
 	ndm->ndm_state	 = NUD_NONE;
 
 	if (nla_put(skb, NDA_DST, tbl->key_len, pn->key))
@@ -2285,7 +2285,7 @@ static int pneigh_dump_table(struct neig
 		if (h > s_h)
 			s_idx = 0;
 		for (n = tbl->phash_buckets[h], idx = 0; n; n = n->next) {
-			if (dev_net(n->dev) != net)
+			if (pneigh_net(n) != net)
 				continue;
 			if (idx < s_idx)
 				goto next;

Patches currently in stable-queue which might be from [email protected] are

queue-4.2/net-neighbour-fix-crash-at-dumping-device-agnostic-proxy-entries.patch