Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BDE7F3E717A for ; Tue, 6 Oct 2026 10:30:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791282630; cv=none; b=T3RPzNCjRZolk9v65NBMgnYTTHrmFC/Ubrd1uoVb1DkRcVMLXoCzflxBpIQigJXkudrjyRvw4xTASS5E7EejnkhvbWHjUcB91g5kY9L5TXXYnf20LJLPp0hQS71IHVEidrUIKJeSt9vW4W4tIqZgNtVnp/w2Ci7QrpLc8VvYeMw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791282630; c=relaxed/simple; bh=1fu1V7JU8feh1rMw2h0mQ0iUbCxoYyK1jHkJwUGDjSY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=qRBo5Hsx6c8qHr1fAZKHG94560a1CvbXsjKJuBN4bDBdeJzFpPs9Ci3hX7a0YoynFHwlcyYsZ9fk0GyX1jzcIcPkNxiKkr+Bsg5wGpfz6vUZ8/KI7UOF65RqZT+qsth7sqZiBNWUvmUqR9l+wKwZLTq9ae8UzRn22vS1Y3WrTRs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=yRrv50c8; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="yRrv50c8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EC41B1F000FF; Tue, 6 Oct 2026 10:30:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1791282628; bh=pHVjnENkiGKpxM7pzeaMBOKAp4BZI/FS5pgV1uPxEy8=; h=From:To:Cc:Subject:Date:Reply-To; b=yRrv50c84PGFnDniqp2XBVWcrxibaDz2FKiSBP9Ljp/WdRS8QZJpE2htgvHIQn0wI nzb5x0y3c7obLeiI1jT/SCWkWdKlJhKUBC47lNDIJIZTDOvPBRv+4oR150WWvknh5b msL8pFp6+GiK1h4kofQvzWQ+Ipi+3g9ijoU3/PqY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-98372: xfrm: iptfs: fix stack OOB read in iptfs_skb_reset_frag_walk() Date: Tue, 6 Oct 2026 10:47:53 +0200 Message-ID: <2026100623-CVE-2026-98372-b2b5@gregkh> X-Mailer: git-send-email 2.56.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4140; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=9TP6v+PPSYHLUXXXtEmAHE5fz611pcIRIbDC48ZoB5s=; b=owGbwMvMwCRo6H6F97bub03G02pJDFlHtip/PF5seVrrctX9VvXM5RId4jYPxTgrI194VpT7T N1+7ThDRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzk9FKGBYc3blz8YEpsaY3f oh+T1Z5qTahdfYlhwdGVeWdS5gSKRbOHyB9PyAr6Ea20AgA= 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: xfrm: iptfs: fix stack OOB read in iptfs_skb_reset_frag_walk() iptfs_skb_reset_frag_walk() advances to the fragment containing @offset with an unbounded loop: while (offset >= walk->past + walk->frags[walk->fragi].len) walk->past += walk->frags[walk->fragi++].len; walk->fragi is advanced and walk->frags[walk->fragi] is dereferenced without ever checking fragi against walk->nr_frags. When the requested offset is at or beyond the total length spanned by the walk's fragments, fragi runs past nr_frags and off the end of the fixed-size on-stack frags[MAX_SKB_FRAGS + 1] array, reading out-of-bounds stack memory. The two callers behave differently: iptfs_skb_add_frags() already guards against this with if (!walk->nr_frags || offset >= walk->total + walk->initial_offset) return len; but iptfs_skb_can_add_frags() has no such guard and calls iptfs_skb_reset_frag_walk() unconditionally, so it performs the out-of-range walk. Its own "fragi < walk->nr_frags" bound check runs only afterwards, too late to prevent the read. This is reachable from the receive path: a crafted IP-TFS (AGGFRAG) payload delivered to an IPTFS SA drives iptfs_reassem_cont() -> iptfs_skb_can_add_frags() with an offset past the fragment total, e.g.: BUG: KASAN: stack-out-of-bounds in iptfs_skb_reset_frag_walk+0x235/0x250 Read of size 4 at addr ffff888008ad7210 by task repro/345 iptfs_skb_reset_frag_walk+0x235/0x250 net/xfrm/xfrm_iptfs.c:392 iptfs_skb_can_add_frags+0x155/0x310 net/xfrm/xfrm_iptfs.c:420 iptfs_reassem_cont+0xcf8/0x1140 net/xfrm/xfrm_iptfs.c:902 iptfs_input_ordered+0x552/0x670 net/xfrm/xfrm_iptfs.c:1280 iptfs_input+0x3d6/0xde0 net/xfrm/xfrm_iptfs.c:1741 xfrm_input+0x282f/0x6140 net/xfrm/xfrm_input.c:700 xfrm4_esp_rcv+0x93/0x120 net/ipv4/xfrm4_protocol.c:104 ip_rcv+0x278/0x2d0 net/ipv4/ip_input.c:612 Give iptfs_skb_can_add_frags() the same up-front guard that iptfs_skb_add_frags() already has, so the walk is never entered with an out-of-range offset. When it triggers, the caller falls back to the existing linearize-and-copy path, which is safe. The Linux kernel CVE team has assigned CVE-2026-98372 to this issue. Affected and fixed versions =========================== Issue introduced in 6.14 with commit 5f2b6a9095743a6bf1f34c43c4fe78fa8bdf5ad7 and fixed in 6.18.54 with commit 7e1c6884a0b494b7e3f204877f94c1e07a117bf7 Issue introduced in 6.14 with commit 5f2b6a9095743a6bf1f34c43c4fe78fa8bdf5ad7 and fixed in 7.2.8 with commit da56d0ee93d1bad779b0486f2fab92d1bc1f0cf3 Issue introduced in 6.14 with commit 5f2b6a9095743a6bf1f34c43c4fe78fa8bdf5ad7 and fixed in 7.3-rc4 with commit d042487dc118e494db2e2c1382310255c90ff544 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-98372 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: net/xfrm/xfrm_iptfs.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/7e1c6884a0b494b7e3f204877f94c1e07a117bf7 https://git.kernel.org/stable/c/da56d0ee93d1bad779b0486f2fab92d1bc1f0cf3 https://git.kernel.org/stable/c/d042487dc118e494db2e2c1382310255c90ff544