]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net/sched: netem: handle multi-segment skb in corruption
authorStephen Hemminger <stephen@networkplumber.org>
Sat, 9 May 2026 17:03:25 +0000 (10:03 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 14 May 2026 09:41:30 +0000 (11:41 +0200)
commite8be7cdedc41ff28876d66b566770929d03acbb8
tree2f4c97c44d47a06ed767b41138aae3db7f510bce
parent675f6f1968a6710f357ac2ab65b0cf6180b8f400
net/sched: netem: handle multi-segment skb in corruption

The packet corruption code only flipped bits in the linear
header portion of the skb, skipping corruption when
skb_headlen() was zero.

Linearize the whole skb if necessary before corruption.
Extends d64cb81dcbd5 ("net/sched: sch_netem: fix out-of-bounds access
in packet corruption") with a more general solution.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Link: https://patch.msgid.link/20260509171123.307549-5-stephen@networkplumber.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/sched/sch_netem.c