# 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.

- Web page: https://patchblox.com/security/cve/CVE-2025-40123
- Priority: High
- CVSS: 7.8 (high)
- EPSS: 0.0017
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Oct 27, 2025

## Description

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

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

---

Data as of 2026-11-08T13:06:02Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

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.
