Skip to contentSkip to conversation

Patch "net: neigh: guard against NULL solicit() method" has been added to the 3.18-stable tree

PATCH [email protected] 1 participant 1 message Apr 30, 2017

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: neigh: guard against NULL solicit() method

to the 3.18-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-neigh-guard-against-null-solicit-method.patch
and it can be found in the queue-3.18 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 Sun Apr 30 15:50:51 CEST 2017

From: Eric Dumazet <[email protected]>
Date: Thu, 23 Mar 2017 12:39:21 -0700
Subject: net: neigh: guard against NULL solicit() method

From: Eric Dumazet <[email protected]>

[ Upstream commit 48481c8fa16410ffa45939b13b6c53c2ca609e5f ]

Dmitry posted a nice reproducer of a bug triggering in neigh_probe() when dereferencing a NULL neigh->ops->solicit method.

This can happen for arp_direct_ops/ndisc_direct_ops and similar, which can be used for NUD_NOARP neighbours (created when dev->header_ops is NULL). Admin can then force changing nud_state to some other state that would fire neigh timer.

---
 net/core/neighbour.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
net/core/neighbour.c +2 -1
@@ -875,7 +875,8 @@ static void neigh_probe(struct neighbour
 	if (skb)
 		skb = skb_copy(skb, GFP_ATOMIC);
 	write_unlock(&neigh->lock);
-	neigh->ops->solicit(neigh, skb);
+	if (neigh->ops->solicit)
+		neigh->ops->solicit(neigh, skb);
 	atomic_inc(&neigh->probes);
 	kfree_skb(skb);
 }

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

queue-3.18/net-packet-fix-overflow-in-check-for-tp_frame_nr.patch queue-3.18/net-packet-fix-overflow-in-check-for-tp_reserve.patch queue-3.18/net-neigh-guard-against-null-solicit-method.patch