Patch "netem: fix a use after free" has been added to the 4.6-stable tree
Subsystems (4)
This is a note to let you know that I've just added the patch titled
netem: fix a use after free
to the 4.6-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:
netem-fix-a-use-after-free.patch
and it can be found in the queue-4.6 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 Wed Jul 6 16:50:56 PDT 2016
From: Eric Dumazet <[email protected]>
Date: Mon, 20 Jun 2016 15:00:43 -0700
Subject: netem: fix a use after free
From: Eric Dumazet <[email protected]>
[ Upstream commit 21de12ee5568fd1aec47890c72967abf791ac80a ]
If the packet was dropped by lower qdisc, then we must not access it later.
Save qdisc_pkt_len(skb) in a temp variable.
--- net/sched/sch_netem.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
net/sched/sch_netem.c +6 -6
@@ -650,14 +650,14 @@ deliver:#endif if (q->qdisc) { +unsigned int pkt_len =qdisc_pkt_len (skb);int err =qdisc_enqueue (skb, q->qdisc); -if (unlikely (err !=NET_XMIT_SUCCESS )) { -if (net_xmit_drop_count (err)) { -qdisc_qstats_drop (sch); -qdisc_tree_reduce_backlog (sch,1 , -qdisc_pkt_len (skb)); - } +if (err !=NET_XMIT_SUCCESS && +net_xmit_drop_count (err)) { +qdisc_qstats_drop (sch); +qdisc_tree_reduce_backlog (sch,1 , + pkt_len); } goto tfifo_dequeue; }
Patches currently in stable-queue which might be from [email protected] are
queue-4.6/netem-fix-a-use-after-free.patch queue-4.6/net_sched-fix-pfifo_head_drop-behavior-vs-backlog.patch