diff options
author | Toke Høiland-Jørgensen <toke@toke.dk> | 2022-08-31 23:52:18 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-09-02 12:23:26 +0100 |
commit | 9efd23297cca530bb35e1848665805d3fcdd7889 (patch) | |
tree | 4a5e567d181a5eb9b836a515536bacc2f11ce4ca /net/tipc | |
parent | 7fdc77665f3d45c9da7c6edd4beadee9790f43aa (diff) |
sch_sfb: Don't assume the skb is still around after enqueueing to child
The sch_sfb enqueue() routine assumes the skb is still alive after it has
been enqueued into a child qdisc, using the data in the skb cb field in the
increment_qlen() routine after enqueue. However, the skb may in fact have
been freed, causing a use-after-free in this case. In particular, this
happens if sch_cake is used as a child of sfb, and the GSO splitting mode
of CAKE is enabled (in which case the skb will be split into segments and
the original skb freed).
Fix this by copying the sfb cb data to the stack before enqueueing the skb,
and using this stack copy in increment_qlen() instead of the skb pointer
itself.
Reported-by: zdi-disclosures@trendmicro.com # ZDI-CAN-18231
Fixes: e13e02a3c68d ("net_sched: SFB flow scheduler")
Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc')
0 files changed, 0 insertions, 0 deletions