From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 624F534A78F for ; Wed, 24 Dec 2025 13:12:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766581930; cv=none; b=EkJ53U4HcG6kC5VZ07l5DEAnChICwyKzjNDILJ5jD+rSUNkLryz18FhlTEaVOHcFdz3BbWN4shD+LyEysgrmEWfKUrv6TCB2Q6QE9IGLOF0x/QrKPkU1hv4joPCkd6mnLnohiY36JhxhIKPjfeP89KRAyKgOW6bv+vX1fS4PmTU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766581930; c=relaxed/simple; bh=TU614/xsjZrxoz8h82CzCH171WKxqD6iSRjpmeVN1GE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=JGGzura8By51/+F9rsEOohVryPb/gPyN5HmpsB44MG1Dy0yn1luw7yqmPGFp2r1BfbqFOABjGBVgqxqcNqP3UHfXBtFeCcs/SW7uIHWck0J897hkbhr1J76w2jIyAFGBEKdotjU1UZM/bPXRZZWXmD8XVXjhpGrsPXJgzEo3rsY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ybfMnFh0; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="ybfMnFh0" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DFEE8C4CEFB; Wed, 24 Dec 2025 13:12:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1766581930; bh=TU614/xsjZrxoz8h82CzCH171WKxqD6iSRjpmeVN1GE=; h=From:To:Cc:Subject:Date:Reply-To:From; b=ybfMnFh0NIh8GVlZAAKSc3T5L+qUGO2UsHE5HA/CMFn3mxtf6oEg4fotnp3ZZcN8Q nItqp+rtxzvo51Hf0neJoA+sgCT5baN8X1+9R0amxnJD+W0TwTuW4UBv/tbaAwX7XD kaRe2Ft8S/8JY9lA0rTfkuL4pVEfacvTSnIduW0c= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-54155: net: core: remove unnecessary frame_sz check in bpf_xdp_adjust_tail() Date: Wed, 24 Dec 2025 14:07:52 +0100 Message-ID: <2025122427-CVE-2023-54155-e238@gregkh> X-Mailer: git-send-email 2.52.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=4157; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=JTylMnvc9DB0bwV7f22F3pwWREIjN1H+B/oHVYnLQQo=; b=owGbwMvMwCRo6H6F97bub03G02pJDJneT0N+FZl7m5W+3vpGt6Nn39N1P2v3XbaLf8KWsXHee 8Y/JnydHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjARplMMC9at3jD3J/fel4G/ 60W5mq/OcpNbxsIwvyxk8d27j2PNSut2a+8/do+BbcJiPgA= 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: net: core: remove unnecessary frame_sz check in bpf_xdp_adjust_tail() Syzkaller reported the following issue: ======================================= Too BIG xdp->frame_sz = 131072 WARNING: CPU: 0 PID: 5020 at net/core/filter.c:4121 ____bpf_xdp_adjust_tail net/core/filter.c:4121 [inline] WARNING: CPU: 0 PID: 5020 at net/core/filter.c:4121 bpf_xdp_adjust_tail+0x466/0xa10 net/core/filter.c:4103 ... Call Trace: bpf_prog_4add87e5301a4105+0x1a/0x1c __bpf_prog_run include/linux/filter.h:600 [inline] bpf_prog_run_xdp include/linux/filter.h:775 [inline] bpf_prog_run_generic_xdp+0x57e/0x11e0 net/core/dev.c:4721 netif_receive_generic_xdp net/core/dev.c:4807 [inline] do_xdp_generic+0x35c/0x770 net/core/dev.c:4866 tun_get_user+0x2340/0x3ca0 drivers/net/tun.c:1919 tun_chr_write_iter+0xe8/0x210 drivers/net/tun.c:2043 call_write_iter include/linux/fs.h:1871 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x650/0xe40 fs/read_write.c:584 ksys_write+0x12f/0x250 fs/read_write.c:637 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x38/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd xdp->frame_sz > PAGE_SIZE check was introduced in commit c8741e2bfe87 ("xdp: Allow bpf_xdp_adjust_tail() to grow packet size"). But Jesper Dangaard Brouer noted that after introducing the xdp_init_buff() which all XDP driver use - it's safe to remove this check. The original intend was to catch cases where XDP drivers have not been updated to use xdp.frame_sz, but that is not longer a concern (since xdp_init_buff). Running the initial syzkaller repro it was discovered that the contiguous physical memory allocation is used for both xdp paths in tun_get_user(), e.g. tun_build_skb() and tun_alloc_skb(). It was also stated by Jesper Dangaard Brouer that XDP can work on higher order pages, as long as this is contiguous physical memory (e.g. a page). The Linux kernel CVE team has assigned CVE-2023-54155 to this issue. Affected and fixed versions =========================== Issue introduced in 5.12 with commit 43b5169d8355ccf26d726fbc75f083b2429113e4 and fixed in 5.15.127 with commit a09c258cfa77d3ba0a7acc555c73eb6b005c4bd8 Issue introduced in 5.12 with commit 43b5169d8355ccf26d726fbc75f083b2429113e4 and fixed in 6.1.46 with commit 20acffcdc2b74fb7dcc4e299f7aca173df89d911 Issue introduced in 5.12 with commit 43b5169d8355ccf26d726fbc75f083b2429113e4 and fixed in 6.4.11 with commit d9252d67ed2f921c230bba449ee051b5c32e4841 Issue introduced in 5.12 with commit 43b5169d8355ccf26d726fbc75f083b2429113e4 and fixed in 6.5 with commit d14eea09edf427fa36bd446f4a3271f99164202f 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-2023-54155 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/core/filter.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/a09c258cfa77d3ba0a7acc555c73eb6b005c4bd8 https://git.kernel.org/stable/c/20acffcdc2b74fb7dcc4e299f7aca173df89d911 https://git.kernel.org/stable/c/d9252d67ed2f921c230bba449ee051b5c32e4841 https://git.kernel.org/stable/c/d14eea09edf427fa36bd446f4a3271f99164202f