Commit dee3429e94d8 for kernel
commit dee3429e94d8089713645706df678ec54a049e13
Merge: ca98aabb2210 53e7352d65f7
Author: Jakub Kicinski <kuba@kernel.org>
Date: Thu Nov 12 11:25:31 2026 -0800
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>