Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net: sched: prevent a use after free
The bug is that we call kfree_skb(skb) and then pass "skb" to qdisc_pkt_len(skb) on the next line, which is a use after free. Also Cong Wang points out that it's better to delay the actual frees until we drop the rtnl lock so we should use rtnl_kfree_skbs() instead of kfree_skb(). Cc: Cong Wang <[email protected]> Fixes: ec97ecf ("net: sched: add Flow Queue PIE packet scheduler") Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Cong Wang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
- Loading branch information