cve.bz

CVE-2025-21756 linux linux kernel: Use After Free

7.8 highEPSS 0.9%Fix available

High (7.8) in linux linux kernel. EPSS 0.9% estimated probability of exploitation activity in the next 30 days.

On this page
In the Linux kernel, the following vulnerability has been resolved: vsock: Keep the binding until socket destruction Preserve sockets bindings; this includes both resulting from an explicit bind() and those implicitly bound through autobind during connect(). Prevents socket unbinding during a transport reassignment, which fixes a use-after-free: 1. vsock_create() (refcnt=1) calls vsock_insert_unbound() (refcnt=2) 2. transport->release() calls vsock_remove_bound() without checking if sk was bound and moved to bound list (refcnt=1) 3. vsock_bind() assumes sk is in unbound list and before __vsock_insert_bound(vsock_bound_sockets()) calls __vsock_remove_bound() which does: list_del_init(&vsk->bound_table); // nop sock_put(&vsk->sk); // refcnt=0 BUG: KASAN: slab-use-after-free in __vsock_bind+0x62e/0x730 Read of size 4 at addr ffff88816b46a74c by task a.out/2057 dump_stack_lvl+0x68/0x90 print_report+0x174/0x4f6 kasan_report+0xb9/0x190 __vsock_bind+0x62e/0x730 vsock_bind+0x97/0xe0 __sys_bind+0x154/0x1f0 __x64_sys_bind+0x6e/0xb0 do_syscall_64+0x93/0x1b0 entry_SYSCALL_64_after_hwframe+0x76/0x7e Allocated by task 2057: kasan_save_stack+0x1e/0x40 kasan_save_track+0x10/0x30 __kasan_slab_alloc+0x85/0x90 kmem_cache_alloc_noprof+0x131/0x450 sk_prot_alloc+0x5b/0x220 sk_alloc+0x2c/0x870 __vsock_create.constprop.0+0x2e/0xb60 vsock_create+0xe4/0x420 __sock_create+0x241/0x650 __sys_socket+0xf2/0x1a0 __x64_sys_socket+0x6e/0xb0 do_syscall_64+0x93/0x1b0 entry_SYSCALL_64_after_hwframe+0x76/0x7e Freed by task 2057: kasan_save_stack+0x1e/0x40 kasan_save_track+0x10/0x30 kasan_save_free_info+0x37/0x60 __kasan_slab_free+0x4b/0x70 kmem_cache_free+0x1a1/0x590 __sk_destruct+0x388/0x5a0 __vsock_bind+0x5e1/0x730 vsock_bind+0x97/0xe0 __sys_bind+0x154/0x1f0 __x64_sys_bind+0x6e/0xb0 do_syscall_64+0x93/0x1b0 entry_SYSCALL_64_after_hwframe+0x76/0x7e refcount_t: addition on 0; use-after-free. WARNING: CPU: 7 PID: 2057 at lib/refcount.c:25 refcount_warn_saturate+0xce/0x150 RIP: 0010:refcount_warn_saturate+0xce/0x150 __vsock_bind+0x66d/0x730 vsock_bind+0x97/0xe0 __sys_bind+0x154/0x1f0 __x64_sys_bind+0x6e/0xb0 do_syscall_64+0x93/0x1b0 entry_SYSCALL_64_after_hwframe+0x76/0x7e refcount_t: underflow; use-after-free. WARNING: CPU: 7 PID: 2057 at lib/refcount.c:28 refcount_warn_saturate+0xee/0x150 RIP: 0010:refcount_warn_saturate+0xee/0x150 vsock_remove_bound+0x187/0x1e0 __vsock_release+0x383/0x4a0 vsock_release+0x90/0x120 __sock_release+0xa3/0x250 sock_close+0x14/0x20 __fput+0x359/0xa80 task_work_run+0x107/0x1d0 do_exit+0x847/0x2560 do_group_exit+0xb8/0x250 __x64_sys_exit_group+0x3a/0x50 x64_sys_call+0xfec/0x14f0 do_syscall_64+0x93/0x1b0 entry_SYSCALL_64_after_hwframe+0x76/0x7e

Severity

CVSS 3.1

7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
0.9% (unchanged from 0.9% a week ago; 0.9% 30 days ago) estimated probability of exploitation activity in the next 30 days; 60th percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: total, assessed 2025-08-14. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-416 Use After Free
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2025-21756 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-21756?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-21756?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2025-21756 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Linux5.5 and later

Fixed in

ProductRelease lineFixed in
Linux5.105.10.235
Linux5.155.15.179
Linux6.16.1.131
Linux6.66.6.79
Linux6.126.12.16
Linux6.136.13.4
Linuxlater releases6.14

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian11linux5.10.237-1DLA-4178-1
Debian11linux-6.16.1.137-1~deb11u1DLA-4193-1
Debian12linux6.1.133-1DEBIAN-CVE-2025-21756 DSA-5900-1
Debian13, 14linux6.12.16-1DEBIAN-CVE-2025-21756
Ubuntu16.04:LTSlinux-hwe-edgeno fix listedUBUNTU-CVE-2025-21756
Ubuntu18.04:LTSlinux-gcp, linux-hwe, linux-oem and 12 moreno fix listedUBUNTU-CVE-2025-21756
Ubuntu20.04:LTSlinux-aws-5.155.15.0-1082.89~20.04.1UBUNTU-CVE-2025-21756 USN-7455-5
Ubuntu20.04:LTSlinux-azure-5.155.15.0-1087.96~20.04.1UBUNTU-CVE-2025-21756 USN-7455-1
Ubuntu20.04:LTSlinux-azure-fde-5.155.15.0-1087.96~20.04.1.1USN-7455-1
Ubuntu20.04:LTSlinux-gcp-5.155.15.0-1081.90~20.04.1UBUNTU-CVE-2025-21756 USN-7459-2
Ubuntu20.04:LTSlinux-gke, linux-gkeop, linux-riscv and 26 moreno fix listedUBUNTU-CVE-2025-21756
Ubuntu20.04:LTSlinux-hwe-5.15, linux-lowlatency-hwe-5.155.15.0-138.148~20.04.1UBUNTU-CVE-2025-21756 USN-7455-1
Ubuntu20.04:LTSlinux-ibm-5.155.15.0-1074.77~20.04.1UBUNTU-CVE-2025-21756
Ubuntu20.04:LTSlinux-intel-iotg-5.155.15.0-1077.83~20.04.1UBUNTU-CVE-2025-21756 USN-7459-1
Ubuntu20.04:LTSlinux-oracle-5.155.15.0-1079.85~20.04.1UBUNTU-CVE-2025-21756 USN-7455-4
Ubuntu20.04:LTSlinux-riscv-5.155.15.0-1077.81~20.04.1UBUNTU-CVE-2025-21756
59 more for Ubuntu in the JSON and on Ubuntu's page.
Red Hatenterprise_linux:8::baseoskpatch-patch-4_18_0-553, kpatch-patch-4_18_0-553-debuginfo, kpatch-patch-4_18_0-553-debugsource0:1-6.el8_10RHSA-2025:8345
Red Hatenterprise_linux:8::baseoskpatch-patch-4_18_0-553_16_1, kpatch-patch-4_18_0-553_16_1-debuginfo, kpatch-patch-4_18_0-553_16_1-debugsource0:1-5.el8_10RHSA-2025:8345
Red Hatenterprise_linux:8::baseoskpatch-patch-4_18_0-553_30_1, kpatch-patch-4_18_0-553_30_1-debuginfo, kpatch-patch-4_18_0-553_30_1-debugsource0:1-4.el8_10RHSA-2025:8345
Red Hatenterprise_linux:8::baseoskpatch-patch-4_18_0-553_40_1, kpatch-patch-4_18_0-553_40_1-debuginfo, kpatch-patch-4_18_0-553_40_1-debugsource0:1-2.el8_10RHSA-2025:8345
Red Hatenterprise_linux:8::baseosperf, kernel, bpftool and 30 more0:4.18.0-553.53.1.el8_10RHSA-2025:8056
Red Hatenterprise_linux:8::crbperf-debuginfo, kernel-debuginfo, bpftool-debuginfo and 7 more0:4.18.0-553.53.1.el8_10RHSA-2025:8056
Red Hatenterprise_linux:8::nfvkernel-rt, kernel-rt-kvm, kernel-rt-core and 12 more0:4.18.0-553.53.1.rt7.394.el8_10RHSA-2025:8057
Red Hatenterprise_linux:8::realtimekernel-rt, kernel-rt-core, kernel-rt-debug and 10 more0:4.18.0-553.53.1.rt7.394.el8_10RHSA-2025:8057
Red Hatenterprise_linux:9::appstreamrv, perf, rtla and 29 more0:5.14.0-570.17.1.el9_6RHSA-2025:7903
Red Hatenterprise_linux:9::baseoskernel, kernel-64k, kernel-core and 45 more0:5.14.0-570.17.1.el9_6RHSA-2025:7903
Red Hatenterprise_linux:9::crblibperf, perf-debuginfo, kernel-debuginfo and 16 more0:5.14.0-570.17.1.el9_6RHSA-2025:7903
Red Hatenterprise_linux:9::nfvkernel-rt, kernel-rt-kvm, kernel-rt-core and 20 more0:5.14.0-570.17.1.el9_6RHSA-2025:7903
59 more for Red Hat in the JSON and on Red Hat's page.
SUSELinux Enterprise High Availability Extension 15 SP4, Linux Enterprise Micro 5.3, Linux Enterprise Micro 5.4 and 1 morekernel-default5.14.21-150400.24.170.2SUSE-SU-2025:02537-1
SUSELinux Enterprise High Availability Extension 15 SP6, Linux Enterprise Live Patching 15 SP6, Linux Enterprise Module for Legacy 15 SP6 and 1 morekernel-default6.4.0-150600.23.47.2SUSE-SU-2025:1180-1
SUSELinux Enterprise High Performance Computing 15 SP4-ESPOS, Linux Enterprise High Performance Computing 15 SP4-LTSSkernel-64kb, kernel-default, kernel-obs-build5.14.21-150400.24.170.2SUSE-SU-2025:02537-1
SUSELinux Enterprise High Performance Computing 15 SP4-ESPOS, Linux Enterprise High Performance Computing 15 SP4-LTSS, Linux Enterprise Micro 5.3 and 5 morekernel-default-base5.14.21-150400.24.170.2.150400.24.86.2SUSE-SU-2025:02537-1
SUSELinux Enterprise High Performance Computing 15 SP4-ESPOS, Linux Enterprise High Performance Computing 15 SP4-LTSS, Linux Enterprise Server 15 SP4-LTSS and 1 morekernel-docs, kernel-syms, kernel-source5.14.21-150400.24.170.1SUSE-SU-2025:02537-1
SUSELinux Enterprise High Performance Computing 15 SP5-ESPOS, Linux Enterprise High Performance Computing 15 SP5-LTSSkernel-64kb, kernel-docs, kernel-syms and 3 more5.14.21-150500.55.113.1SUSE-SU-2025:02264-1
SUSELinux Enterprise High Performance Computing 15 SP5-ESPOS, Linux Enterprise High Performance Computing 15 SP5-LTSS, Linux Enterprise Micro 5.5 and 2 morekernel-default-base5.14.21-150500.55.113.1.150500.6.53.1SUSE-SU-2025:02264-1
SUSELinux Enterprise Live Patching 15 SP4kernel-livepatch-SLE15-SP4_Update_3115-150400.2.1SUSE-SU-2025:03374-1
SUSELinux Enterprise Live Patching 15 SP4kernel-livepatch-SLE15-SP4_Update_3215-150400.2.1SUSE-SU-2025:03370-1
SUSELinux Enterprise Live Patching 15 SP4kernel-livepatch-SLE15-SP4_Update_3314-150400.2.1SUSE-SU-2025:03387-1
SUSELinux Enterprise Live Patching 15 SP4kernel-livepatch-SLE15-SP4_Update_3413-150400.2.1SUSE-SU-2025:03381-1
SUSELinux Enterprise Live Patching 15 SP4kernel-livepatch-SLE15-SP4_Update_367-150400.2.1SUSE-SU-2025:03375-1
57 more for SUSE in the JSON and on SUSE's page.
openSUSELeap 15.6dtb-aarch64, kernel-docs, kernel-syms and 2 more6.4.0-150600.23.47.1SUSE-SU-2025:1180-1
openSUSELeap 15.6kernel-64kb, kernel-debug, kernel-source and 3 more6.4.0-150600.23.47.2SUSE-SU-2025:1180-1
openSUSELeap 15.6kernel-azure, kernel-source-azure6.4.0-150600.8.34.2SUSE-SU-2025:1177-1
openSUSELeap 15.6kernel-default-base6.4.0-150600.23.47.2.150600.12.20.2SUSE-SU-2025:1180-1
openSUSELeap 15.6kernel-rt, kernel-syms-rt, kernel-rt_debug and 1 more6.4.0-150600.10.34.1SUSE-SU-2025:1178-1
openSUSELeap 15.6kernel-syms-azure6.4.0-150600.8.34.1SUSE-SU-2025:1177-1
AlmaLinux8kernel-rt, kernel-rt-core, kernel-rt-debug and 7 more4.18.0-553.53.1.rt7.394.el8_10ALSA-2025:8057
AlmaLinux8perf, kernel, bpftool and 22 more4.18.0-553.53.1.el8_10ALSA-2025:8056
AlmaLinux9rv, perf, rtla and 73 more5.14.0-570.17.1.el9_6ALSA-2025:7903
Rocky Linux8kernel0:4.18.0-553.53.1.el8_10RLSA-2025:8056
Rocky Linux8kernel-rt0:4.18.0-553.53.1.rt7.394.el8_10RLSA-2025:8057
Rocky Linux10kernel0:6.12.0-55.13.1.el10_0RLSA-2025:8137
Azure Linux2kernel5.15.180.1-1AZL-58995
Azure Linux3kernel6.6.82.1-1AZL-59037
Alpaquita23linux-lts6.1.131-r0BELL-CVE-2025-21756
Alpaquita25linux-lts6.12.41-r0BELL-CVE-2025-21756
Alpaquitastreamlinux-lts6.18.35-r1BELL-CVE-2025-21756

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpaquita.

Red Hat

Red Hat rates this Important.

Red Hat's statement

If Virtual Socket Protocol is being used during connection, or during a transport reassignment, a use-after-free could happen. The local user is supposed to call the bind() function when opening the connection.

Red Hat's mitigation

To mitigate this issue, prevent module vsock from being loaded.

Please see https://access.redhat.com/solutions/41278 for information on how to blacklist a kernel module to prevent it from loading automatically.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 10kernel-0:6.12.0-55.13.1.el10_0Fixed 2025-05-26RHSA-2025:8137
Red Hat Enterprise Linux 8kernel-rt-0:4.18.0-553.53.1.rt7.394.el8_10Fixed 2025-05-21RHSA-2025:8057
Red Hat Enterprise Linux 8kernel-0:4.18.0-553.53.1.el8_10Fixed 2025-05-21RHSA-2025:8056
Red Hat Enterprise Linux 8kpatch-patchFixed 2025-06-02RHSA-2025:8345
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Supportkernel-0:4.18.0-305.157.1.el8_4Fixed 2025-05-19RHSA-2025:7901
Red Hat Enterprise Linux 8.4 Telecommunications Update Servicekernel-rt-0:4.18.0-305.157.1.rt7.234.el8_4Fixed 2025-05-19RHSA-2025:7902
Red Hat Enterprise Linux 8.4 Telecommunications Update Servicekernel-0:4.18.0-305.157.1.el8_4Fixed 2025-05-19RHSA-2025:7901
Red Hat Enterprise Linux 8.4 Update Services for SAP Solutionskernel-0:4.18.0-305.157.1.el8_4Fixed 2025-05-19RHSA-2025:7901
Red Hat Enterprise Linux 8.4 Update Services for SAP Solutionskpatch-patchFixed 2025-06-02RHSA-2025:8348
Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Supportkernel-0:4.18.0-372.145.1.el8_6Fixed 2025-05-15RHSA-2025:7652
Red Hat Enterprise Linux 8.6 Telecommunications Update Servicekernel-0:4.18.0-372.145.1.el8_6Fixed 2025-05-15RHSA-2025:7652
Red Hat Enterprise Linux 8.6 Update Services for SAP Solutionskernel-0:4.18.0-372.145.1.el8_6Fixed 2025-05-15RHSA-2025:7652
Red Hat Enterprise Linux 8.6 Update Services for SAP Solutionskpatch-patchFixed 2025-06-02RHSA-2025:8347
Red Hat Enterprise Linux 8.8 Extended Update Supportkernel-0:4.18.0-477.97.1.el8_8Fixed 2025-05-15RHSA-2025:7682
Red Hat Enterprise Linux 8.8 Extended Update Supportkpatch-patchFixed 2025-06-02RHSA-2025:8346
Red Hat Enterprise Linux 9kernel-0:5.14.0-570.17.1.el9_6Fixed 2025-05-19RHSA-2025:7903
Red Hat Enterprise Linux 9.0 Update Services for SAP Solutionskernel-0:5.14.0-70.132.1.el9_0Fixed 2025-05-19RHSA-2025:7897
Red Hat Enterprise Linux 6kernelNot affected
Red Hat Enterprise Linux 7kernelNot affected
Red Hat Enterprise Linux 7kernel-rtNot affected
8 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2025-21756.

ICS advisories (CISA)

AdvisoryTitlePublishedSectorsAffectedFixed
ICSA-26-295-16Siemens SIMATIC S7-1500 TM MFP2026-10-13Critical Manufacturing, Transportation Systems, Energy, Healthcare and Public Health, Financial Services, Government Services and FacilitiesSIMATIC S7-1500 TM MFP - GNU/Linux subsystemnone listed
ICSA-25-162-05Siemens SIMATIC S7-1500 CPU family2025-06-10EnergySIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0), SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0), SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0) and 2 morenone listed
ICSA-24-102-01Siemens SIMATIC S7-1500 TM MFP2024-04-09Critical ManufacturingSIMATIC S7-1500 TM MFP - GNU/Linux subsystemnone listed

From CISA's ICS advisories (CSAF), provided under CISA's notification. Only the facts are shown; each advisory is on CISA's page. Credits.

GitHub PoC

Repositories on GitHub named after this CVE or listed for it by the PoC-in-GitHub index. For those marked Harbor Check: matches CVE, Flawharbor read the code and found it implements this CVE's exploitation technique: read, not run, and its dependencies only checked for warning signs, so a pointer and no guarantee. The rest are unverified: some hold a working proof of concept, some nothing useful, and some malware made to look like one. Read the code before you run any of it.

References

Check your stackJSON