Commit f03de872 authored by Dan Carpenter's avatar Dan Carpenter Committed by openeuler-sync-bot
Browse files

net: sched: Fix use after free in red_enqueue()

stable inclusion
from stable-v5.10.154
commit 5960b9081baca85cc7dcb14aec1de85999ea9d36
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I64YCB

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=5960b9081baca85cc7dcb14aec1de85999ea9d36



--------------------------------

[ Upstream commit 8bdc2acd ]

We can't use "skb" again after passing it to qdisc_enqueue().  This is
basically identical to commit 2f09707d ("sch_sfb: Also store skb
len before calling child enqueue").

Fixes: d7f4f332 ("sch_red: update backlog as well")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarLipeng Sang <sanglipeng1@jd.com>
(cherry picked from commit f01d2806)
parent 7505e61f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment