diff options
| author | Jakub Kicinski <kuba@kernel.org> | 2026-11-12 11:25:31 -0800 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-11-12 11:25:31 -0800 |
| commit | dee3429e94d8089713645706df678ec54a049e13 (patch) | |
| tree | 0cd66a9f0ccc76f1f9a9fea3386bf490eff89da6 /rust/kernel/alloc/kvec/errors.rs | |
| parent | ca98aabb221067856c213a5d830d0dbf40656e0a (diff) | |
| parent | 53e7352d65f70b479de04c2c197aa5e3ca64d8f1 (diff) | |
Merge branch 'nsh-limit-recursion-in-nsh_gso_segment'
Eric Dumazet says:
====================
nsh: limit recursion in nsh_gso_segment()
Sashiko found that nsh_gso_segment() can call itself, through
skb_mac_gso_segment(), once per stacked NSH header. Nothing limits the
depth, and a 64KB GSO packet made of 8-byte NSH headers overflows the
kernel stack. It was reported while reviewing an unrelated virtio
series [1].
Such a packet can be sent with a packet socket using PACKET_VNET_HDR,
when the nsh module is loaded.
Patch 1 uses the recursion counter added in commit 006c8b834aed ("net:
gso: limit recursive IP-in-IP segmentation"), with the same limit as
IPv4 and IPv6.
Patch 2 adds a selftest: it panics an unfixed kernel, and passes with
patch 1.
====================
Link: https://patch.msgid.link/20261112102001.3744643-1-edumazet@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'rust/kernel/alloc/kvec/errors.rs')
0 files changed, 0 insertions, 0 deletions
