CVE-2025-40123

linux: In the Linux kernel, the following vulnerability has been resolved: bpf: Enforce expected_attach_type for tailcall c...

CVE-2025-40123 is fixed in 62 products on 1 platform, first by ALAS2023-2025-1253, released October 27, 2025. It is not reported as exploited. Patch Radar priority: High.

High
CVSS
7.8
high
Exploitation
None reported
No vendor assessment
CISA KEV
Not listed
Not in the Known Exploited Vulnerabilities catalog
EPSS
0.0017
5th percentile

In the Linux kernel, the following vulnerability has been resolved: bpf: Enforce expected_attach_type for tailcall compatibility Yinhao et al. recently reported: Our fuzzer tool discovered an uninitialized pointer issue in the bpf_prog_test_run_xdp() function within the Linux kernel's BPF subsystem. This leads to a NULL pointer dereference when a BPF program attempts to deference the txq member of struct xdp_buff object. The test initializes two programs of BPF_PROG_TYPE_XDP: progA acts as the entry point for bpf_prog_test_run_xdp() and its expected_attach_type can neither be of be BPF_XDP_DEVMAP nor BPF_XDP_CPUMAP. progA calls into a slot of a tailcall map it owns. progB's expected_attach_type must be BPF_XDP_DEVMAP to pass xdp_is_valid_access() validation. The program returns struct xdp_md's egress_ifindex, and the latter is only allowed to be accessed under mentioned expected_attach_type. progB is then inserted into the tailcall which progA calls. The underlying issue goes beyond XDP though. Another example are programs of type BPF_PROG_TYPE_CGROUP_SOCK_ADDR. sock_addr_is_valid_access() as well as sock_addr_func_proto() have different logic depending on the programs' expected_attach_type. Similarly, a program attached to BPF_CGROUP_INET4_GETPEERNAME should not be allowed doing a tailcall into a program which calls bpf_bind() out of BPF which is only enabled for BPF_CGROUP_INET4_CONNECT. In short, specifying expected_attach_type allows to open up additional functionality or restrictions beyond what the basic bpf_prog_type enables. The use of tailcalls must not violate these constraints. Fix it by enforcing expected_attach_type in __bpf_prog_map_compatible(). Note that we only enforce this for tailcall maps, but not for BPF devmaps or cpumaps: There, the programs are invoked through dev_map_bpf_prog_run*() and cpu_map_bpf_prog_run*() which set up a new environment / context and therefore these situations are not prone to this issue.

Where it's fixed

ProductFixed inFixReleased
Linux
bpftool · amzn 2023 1:6.1.156-177.286.amzn2023 ALAS2023-2025-1253 Oct 27, 2025
bpftool-debuginfo · amzn 2023 1:6.1.156-177.286.amzn2023 ALAS2023-2025-1253 Oct 27, 2025
bpftool6.12 · amzn 2023 1:6.12.53-69.119.amzn2023 ALAS2023-2025-1254 Oct 27, 2025
bpftool6.12-debuginfo · amzn 2023 1:6.12.53-69.119.amzn2023 ALAS2023-2025-1254 Oct 27, 2025
dtb-aarch64 · opensuse-leap 16.0 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1 Feb 2, 2026
kernel · amzn 2023 1:6.1.156-177.286.amzn2023 ALAS2023-2025-1253 Oct 27, 2025
kernel-64kb · opensuse-leap 16.0 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1 Feb 2, 2026
kernel-64kb · sles 15.7 6.4.0-150700.53.28.1 SUSE-SU-2026:0315-1 Jan 28, 2026
kernel-64kb · sles 16.0 6.12.0-160000.9.1 SUSE-SU-2026:20220-1 Feb 2, 2026
kernel-azure · opensuse-leap 16.0 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1 Feb 2, 2026
kernel-azure · sles 15.7 6.4.0-150700.20.24.1 SUSE-SU-2026:0281-1 Jan 23, 2026
kernel-azure · sles 16.0 6.12.0-160000.9.1 SUSE-SU-2026:20220-1 Feb 2, 2026
kernel-debuginfo · amzn 2023 1:6.1.156-177.286.amzn2023 ALAS2023-2025-1253 Oct 27, 2025
kernel-debuginfo-common-aarch64 · amzn 2023 1:6.1.156-177.286.amzn2023 ALAS2023-2025-1253 Oct 27, 2025
kernel-debuginfo-common-x86_64 · amzn 2023 1:6.1.156-177.286.amzn2023 ALAS2023-2025-1253 Oct 27, 2025
kernel-default · opensuse-leap 16.0 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1 Feb 2, 2026
kernel-default · sles 15.7 6.4.0-150700.53.28.1 SUSE-SU-2026:0315-1 Jan 28, 2026
kernel-default · sles 16.0 6.12.0-160000.9.1 SUSE-SU-2026:20220-1 Feb 2, 2026
kernel-default-base · opensuse-leap 16.0 6.12.0-160000.9.1.160000.2.6 OPENSUSE-SU-2026:20145-1 Feb 2, 2026
kernel-default-base · sles 15.7 6.4.0-150700.53.28.1.150700.17.19.1 SUSE-SU-2026:0315-1 Jan 28, 2026
kernel-default-base · sles 16.0 6.12.0-160000.9.1.160000.2.6 SUSE-SU-2026:20220-1 Feb 2, 2026
kernel-devel · amzn 2023 1:6.1.156-177.286.amzn2023 ALAS2023-2025-1253 Oct 27, 2025
kernel-docs · opensuse-leap 16.0 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1 Feb 2, 2026
kernel-docs · sles 15.7 6.4.0-150700.53.28.1 SUSE-SU-2026:0315-1 Jan 28, 2026
kernel-docs · sles 16.0 6.12.0-160000.9.1 SUSE-SU-2026:20220-1 Feb 2, 2026
kernel-headers · amzn 2023 1:6.1.156-177.286.amzn2023 ALAS2023-2025-1253 Oct 27, 2025
kernel-kvmsmall · opensuse-leap 16.0 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1 Feb 2, 2026
kernel-kvmsmall · sles 16.0 6.12.0-160000.9.1 SUSE-SU-2026:20220-1 Feb 2, 2026
kernel-libbpf · amzn 2023 1:6.1.156-177.286.amzn2023 ALAS2023-2025-1253 Oct 27, 2025
kernel-libbpf-debuginfo · amzn 2023 1:6.1.156-177.286.amzn2023 ALAS2023-2025-1253 Oct 27, 2025
kernel-libbpf-devel · amzn 2023 1:6.1.156-177.286.amzn2023 ALAS2023-2025-1253 Oct 27, 2025
kernel-libbpf-static · amzn 2023 1:6.1.156-177.286.amzn2023 ALAS2023-2025-1253 Oct 27, 2025
kernel-livepatch-6.1.156-177.286 · amzn 2023 1:1.0-0.amzn2023 ALAS2023-2025-1253 Oct 27, 2025
kernel-livepatch-6.12.53-69.119 · amzn 2023 1:1.0-0.amzn2023 ALAS2023-2025-1254 Oct 27, 2025
kernel-livepatch-SLE15-SP7-RT_Update_8 · sles 15.7 1-150700.1.3.1 SUSE-SU-2026:0278-1 Jan 23, 2026
kernel-livepatch-SLE15-SP7_Update_8 · sles 15.7 1-150700.15.3.1 SUSE-SU-2026:0315-1 Jan 28, 2026
kernel-modules-extra · amzn 2023 1:6.1.156-177.286.amzn2023 ALAS2023-2025-1253 Oct 27, 2025
kernel-modules-extra-common · amzn 2023 1:6.1.156-177.286.amzn2023 ALAS2023-2025-1253 Oct 27, 2025
kernel-obs-build · opensuse-leap 16.0 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1 Feb 2, 2026
kernel-obs-build · sles 15.7 6.4.0-150700.53.28.1 SUSE-SU-2026:0315-1 Jan 28, 2026
kernel-obs-qa · opensuse-leap 16.0 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1 Feb 2, 2026
kernel-obs-qa · sles 16.0 6.12.0-160000.9.1 SUSE-SU-2026:20220-1 Feb 2, 2026
kernel-rt · opensuse-leap 16.0 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1 Feb 2, 2026
kernel-source · opensuse-leap 16.0 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1 Feb 2, 2026
kernel-source · sles 15.7 6.4.0-150700.53.28.1 SUSE-SU-2026:0315-1 Jan 28, 2026
kernel-source · sles 16.0 6.12.0-160000.9.1 SUSE-SU-2026:20220-1 Feb 2, 2026
kernel-source-azure · sles 15.7 6.4.0-150700.20.24.1 SUSE-SU-2026:0281-1 Jan 23, 2026
kernel-syms · opensuse-leap 16.0 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1 Feb 2, 2026
kernel-syms · sles 15.7 6.4.0-150700.53.28.1 SUSE-SU-2026:0315-1 Jan 28, 2026
kernel-syms · sles 16.0 6.12.0-160000.9.1 SUSE-SU-2026:20220-1 Feb 2, 2026
kernel-syms-azure · sles 15.7 6.4.0-150700.20.24.1 SUSE-SU-2026:0281-1 Jan 23, 2026
kernel-tools · amzn 2023 1:6.1.156-177.286.amzn2023 ALAS2023-2025-1253 Oct 27, 2025
kernel-tools-debuginfo · amzn 2023 1:6.1.156-177.286.amzn2023 ALAS2023-2025-1253 Oct 27, 2025
kernel-tools-devel · amzn 2023 1:6.1.156-177.286.amzn2023 ALAS2023-2025-1253 Oct 27, 2025
kernel-zfcpdump · opensuse-leap 16.0 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1 Feb 2, 2026
kernel-zfcpdump · sles 15.7 6.4.0-150700.53.28.1 SUSE-SU-2026:0315-1 Jan 28, 2026
kernel-zfcpdump · sles 16.0 6.12.0-160000.9.1 SUSE-SU-2026:20220-1 Feb 2, 2026
kernel6.12 · amzn 2023 1:6.12.53-69.119.amzn2023 ALAS2023-2025-1254 Oct 27, 2025
kernel6.12-debuginfo · amzn 2023 1:6.12.53-69.119.amzn2023 ALAS2023-2025-1254 Oct 27, 2025
kernel6.12-debuginfo-common-aarch64 · amzn 2023 1:6.12.53-69.119.amzn2023 ALAS2023-2025-1254 Oct 27, 2025
kernel6.12-debuginfo-common-x86_64 · amzn 2023 1:6.12.53-69.119.amzn2023 ALAS2023-2025-1254 Oct 27, 2025
kernel6.12-devel · amzn 2023 1:6.12.53-69.119.amzn2023 ALAS2023-2025-1254 Oct 27, 2025
kernel6.12-headers · amzn 2023 1:6.12.53-69.119.amzn2023 ALAS2023-2025-1254 Oct 27, 2025
kernel6.12-libbpf · amzn 2023 1:6.12.53-69.119.amzn2023 ALAS2023-2025-1254 Oct 27, 2025
kernel6.12-libbpf-debuginfo · amzn 2023 1:6.12.53-69.119.amzn2023 ALAS2023-2025-1254 Oct 27, 2025
kernel6.12-libbpf-devel · amzn 2023 1:6.12.53-69.119.amzn2023 ALAS2023-2025-1254 Oct 27, 2025
kernel6.12-libbpf-static · amzn 2023 1:6.12.53-69.119.amzn2023 ALAS2023-2025-1254 Oct 27, 2025
kernel6.12-modules-extra · amzn 2023 1:6.12.53-69.119.amzn2023 ALAS2023-2025-1254 Oct 27, 2025
kernel6.12-modules-extra-common · amzn 2023 1:6.12.53-69.119.amzn2023 ALAS2023-2025-1254 Oct 27, 2025
kernel6.12-tools · amzn 2023 1:6.12.53-69.119.amzn2023 ALAS2023-2025-1254 Oct 27, 2025
kernel6.12-tools-debuginfo · amzn 2023 1:6.12.53-69.119.amzn2023 ALAS2023-2025-1254 Oct 27, 2025
kernel6.12-tools-devel · amzn 2023 1:6.12.53-69.119.amzn2023 ALAS2023-2025-1254 Oct 27, 2025
linux · Debian 12.15 (bookworm) 6.1.158-1 DEBIAN-CVE-2025-40123 Nov 12, 2025
linux · Debian 13.5 (trixie) 6.12.57-1 DEBIAN-CVE-2025-40123 Nov 12, 2025
linux · Debian 14 6.17.6-1 DEBIAN-CVE-2025-40123 Nov 12, 2025
perf · amzn 2023 1:6.1.156-177.286.amzn2023 ALAS2023-2025-1253 Oct 27, 2025
perf-debuginfo · amzn 2023 1:6.1.156-177.286.amzn2023 ALAS2023-2025-1253 Oct 27, 2025
perf6.12 · amzn 2023 1:6.12.53-69.119.amzn2023 ALAS2023-2025-1254 Oct 27, 2025
perf6.12-debuginfo · amzn 2023 1:6.12.53-69.119.amzn2023 ALAS2023-2025-1254 Oct 27, 2025
python3-perf · amzn 2023 1:6.1.156-177.286.amzn2023 ALAS2023-2025-1253 Oct 27, 2025
python3-perf-debuginfo · amzn 2023 1:6.1.156-177.286.amzn2023 ALAS2023-2025-1253 Oct 27, 2025
python3-perf6.12 · amzn 2023 1:6.12.53-69.119.amzn2023 ALAS2023-2025-1254 Oct 27, 2025
python3-perf6.12-debuginfo · amzn 2023 1:6.12.53-69.119.amzn2023 ALAS2023-2025-1254 Oct 27, 2025

Patch Radar data is free to use with attribution. Terms and how to credit it.

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.