From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796290234; b=afcghZ/yoB2E+EgeOh/HnXQQmbHcAnxD7JhNtmvWLDQxoWX+MiKVaAAIwP/qhcfTMyJp AwkY/AxVZDtsITSr4gXwt+qpAHjmvyj+U7PDr7/XLQEuxlIShAG6jzsGSIbdX4pFXRzU8 vDtYKqb/qEmFUD+YKdGe5DpB28rXl7v5SkjufLkGwrWd+66IsrL4awZb8p8xJbfxbqJPZ fZclBcqqLGrrfkO40SRP9xRfZ7IyhP/fbaB6KOidHAtiNNAEaj3pRfwmIYnrJ3uBBwNbJ 4lMcIMEX+ohqpII2hlLWTQoWGL2OTh2TqUb4+0xUBu92FjQSolPLt3nTSdLifqc60zw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796290234; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: Reply-To:MIME-Version:Lines:X-Developer-Signature:X-Developer-Key: Content-Transfer-Encoding; bh=bD1ZgJ8BuM3e7/1oWs62sFaOv02rbgrvtDg0n+Q5y0o=; b=FK+wabwlxYEp2lCl0viBBSy+4cUoboZWdMsqNaqBvA/IKnJJtBMnD7ZkAGszxm5y+nyz VV4BUtFoiwYPRJDXLuckXHW6vajA4bVHHT9uFMriPdmbgeUCxYEOoWUjtl/bC78CHop3G X5lUfG+R+yuFzQnOHaDOevkx+rh13Am3jGTiEwXS6wo/MIbYZxkkOhe5+IoxldgP7BBXB D9r9WK94pkSUQ0nqJOK+DODwqAOkDujqHuDgMQHgItokESNbUQ/39ZyumslJGq6JrOPcT Vk7hZe97C3OokAgNChN2h12YDXfFIcQisisOw10NnMNhwWKw/TJWsmKHHPXjXa2GmRQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=L7f+CHEq; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 72644606A680 for ; Thu, 3 Dec 2026 09:30:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=L7f+CHEq Received: by smtp.kernel.org (Postfix) with ESMTPSA id B30A21F000C1; Thu, 3 Dec 2026 09:30:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796290234; bh=bD1ZgJ8BuM3e7/1oWs62sFaOv02rbgrvtDg0n+Q5y0o=; h=From:To:Cc:Subject:Date:Reply-To; b=L7f+CHEqzBFH9lzqfg470dDIXaTxeMjn1hsimFlIweLbry1Mgv5t3ZYTi7rGYuULH 2gF1dgBpPErZd4qfZZFBp34CM1azWHsZZyvdqo5QCJnMNj/jL49/r+ehZl3UR8luGP ClOr4tBK6gN3+2Sk4iChYgQ0G0oqeORDhSWqm6pQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-143186: nsh: limit recursion in nsh_gso_segment() Date: Thu, 3 Dec 2026 10:20:22 +0100 Message-ID: <2026120312-CVE-2026-143186-e4a6@gregkh> X-Mailer: git-send-email 2.56.1 Reply-To: , X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4401; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=bV9PPZLmJZdO6sAemfEnWPRJeKWX6ziay1Jy7LO3PC0=; b=owGbwMvMwCRo6H6F97bub03G02pJDNmCxjM+nJLSnnNmoaP/0bVOlzivZ8f8LZ/t7Rtw7kvk2 3sPKrIudcSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEUooYFpz/6XpWjPWywqXY +dufPnS8dklMKYphwUapFwWMW+1OhH8ONEl/ZXrqkP2R8wA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: nsh: limit recursion in nsh_gso_segment() nsh_gso_segment() calls skb_mac_gso_segment() for the inner packet, which calls nsh_gso_segment() again when the next protocol is NSH, either directly or behind an inner Ethernet header (ETH_P_TEB). Nothing limits the depth: a GSO packet made of stacked 8-byte NSH headers recurses once per header, and a 64KB packet can hold about 8000 of them, overflowing the kernel stack. Such a packet can be injected with a packet socket using PACKET_VNET_HDR, or with tun/tap or virtio_net, as nothing checks that a GSO packet with VIRTIO_NET_HDR_F_NEEDS_CSUM carries the protocol it claims. It is then segmented in software if the output device does not support the GSO type: BUG: TASK stack guard page was hit at ffffcad5c0ab3ff8 (stack is ffffcad5c0ab4000..ffffcad5c0ab8000) Oops: stack guard page: 0000 [#1] SMP NOPTI CPU: 3 UID: 0 PID: 337 Comm: nsh_gso Tainted: G E 7.4.0-rc1+ #118 PREEMPT(lazy) RIP: 0010:lock_acquire (kernel/locking/lockdep.c:5902) Call Trace: skb_mac_gso_segment (include/linux/rcupdate.h:309 include/linux/rcupdate.h:849 net/core/gso.c:50) nsh_gso_segment (net/nsh/nsh.c:110) nsh skb_mac_gso_segment (net/core/gso.c:53) nsh_gso_segment (net/nsh/nsh.c:110) nsh [...] skb_mac_gso_segment (net/core/gso.c:53) __skb_gso_segment (net/core/gso.c:129) validate_xmit_skb (net/core/dev.c:4238) __dev_queue_xmit (net/core/dev.c:5087) packet_sendmsg (net/packet/af_packet.c:3157 net/packet/af_packet.c:3189) __sys_sendto (net/socket.c:800 net/socket.c:818 net/socket.c:2283) __x64_sys_sendto (net/socket.c:2290 net/socket.c:2286 net/socket.c:2286) do_syscall_64 (arch/x86/entry/syscall_64.c:61 arch/x86/entry/syscall_64.c:84) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:121) Use gso_recursion_inc_test(), added in commit 006c8b834aed ("net: gso: limit recursive IP-in-IP segmentation"), with the same limit as IPv4 and IPv6. The counter is shared with them: a packet with four NSH headers in front of an IPv4 header is still segmented, one more NSH header and it is dropped. The NSH -> ETH_P_TEB -> NSH route is covered as well, as each round goes through nsh_gso_segment(). The Linux kernel CVE team has assigned CVE-2026-143186 to this issue. Affected and fixed versions =========================== Issue introduced in 4.14 with commit c411ed854584a71b0e86ac3019b60e4789d88086 and fixed in 6.12.120 with commit fd8822212fc3dbbf96531fcbc3979e2c7f456948 Issue introduced in 4.14 with commit c411ed854584a71b0e86ac3019b60e4789d88086 and fixed in 6.18.66 with commit 74f9a73053cc3cf6e6177d3c5ea9736adf1bdaf6 Issue introduced in 4.14 with commit c411ed854584a71b0e86ac3019b60e4789d88086 and fixed in 7.3.7 with commit 766d400fa553a8cef0670e1cb0664d8b78fd3101 Issue introduced in 4.14 with commit c411ed854584a71b0e86ac3019b60e4789d88086 and fixed in 7.4-rc3 with commit 3921fb102d78a6d7aa61b8d273e097a1a8026b90 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2026-143186 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: include/net/gso.h net/nsh/nsh.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/fd8822212fc3dbbf96531fcbc3979e2c7f456948 https://git.kernel.org/stable/c/74f9a73053cc3cf6e6177d3c5ea9736adf1bdaf6 https://git.kernel.org/stable/c/766d400fa553a8cef0670e1cb0664d8b78fd3101 https://git.kernel.org/stable/c/3921fb102d78a6d7aa61b8d273e097a1a8026b90