{"id":"CVE-2026-23140","summary":"bpf, test_run: Subtract size of xdp_frame from allowed metadata size","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf, test_run: Subtract size of xdp_frame from allowed metadata size\n\nThe xdp_frame structure takes up part of the XDP frame headroom,\nlimiting the size of the metadata. However, in bpf_test_run, we don't\ntake this into account, which makes it possible for userspace to supply\na metadata size that is too large (taking up the entire headroom).\n\nIf userspace supplies such a large metadata size in live packet mode,\nthe xdp_update_frame_from_buff() call in xdp_test_run_init_page() call\nwill fail, after which packet transmission proceeds with an\nuninitialised frame structure, leading to the usual Bad Stuff.\n\nThe commit in the Fixes tag fixed a related bug where the second check\nin xdp_update_frame_from_buff() could fail, but did not add any\nadditional constraints on the metadata size. Complete the fix by adding\nan additional check on the metadata size. Reorder the checks slightly to\nmake the logic clearer and add a comment.","modified":"2026-05-01T08:30:10.782423791Z","published":"2026-02-14T15:22:24.727Z","related":["SUSE-SU-2026:1573-1","SUSE-SU-2026:1661-1","SUSE-SU-2026:21114-1","SUSE-SU-2026:21123-1","SUSE-SU-2026:21237-1","SUSE-SU-2026:21255-1","SUSE-SU-2026:21352-1","SUSE-SU-2026:21361-1","openSUSE-SU-2026:20572-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/23xxx/CVE-2026-23140.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/31e37f44b60679d90b9f999c91371b15291be8e0"},{"type":"WEB","url":"https://git.kernel.org/stable/c/6447e697cfa8a43a8e491cb81bcc390d0f28f8ba"},{"type":"WEB","url":"https://git.kernel.org/stable/c/7c81ad5e580bd8441f8a521a8d34824ce6582ae5"},{"type":"WEB","url":"https://git.kernel.org/stable/c/e558cca217790286e799a8baacd1610bda31b261"},{"type":"WEB","url":"https://git.kernel.org/stable/c/e7440935063949d6f2c10f7328d960d0ff4bce90"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/23xxx/CVE-2026-23140.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-23140"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"b6f1f780b3932ae497ed85e79bc8a1e513883624"},{"fixed":"e7440935063949d6f2c10f7328d960d0ff4bce90"},{"fixed":"7c81ad5e580bd8441f8a521a8d34824ce6582ae5"},{"fixed":"6447e697cfa8a43a8e491cb81bcc390d0f28f8ba"},{"fixed":"31e37f44b60679d90b9f999c91371b15291be8e0"},{"fixed":"e558cca217790286e799a8baacd1610bda31b261"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-23140.json"}}],"schema_version":"1.7.5"}