CVE-2025-21756

Published Feb 27, 2025

Last updated a month ago

CVSS high 7.8
Container Security

Overview

AI description

Automated description summarized from trusted sources.

CVE-2025-21756 affects the Linux kernel's vsock (Virtual Socket) implementation. Disclosed on February 26, 2025, it is a use-after-free vulnerability that occurs during socket destruction and transport reassignment processes within the vsock subsystem. The vulnerability stems from improper handling of socket bindings during transport reassignment. The `vsock_remove_bound` function can be called without verifying if the socket was bound, potentially leading to a use-after-free condition when `vsock_bind` assumes the socket is in an unbound list. A patch has been implemented to preserve socket bindings until socket destruction, resolving the issue.

Description
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
Source
416baaa9-dc9f-4396-8d5f-8c081fb06d67
NVD status
Modified
Products
linux_kernel

Risk scores

CVSS 3.1

Type
Secondary
Base score
7.8
Impact score
5.9
Exploitability score
1.8
Vector string
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Severity
HIGH

Weaknesses

134c704f-9b21-4f2e-91b3-4a467353bcc0
CWE-416

Social media

Hype score
Not currently trending
  1. “Linux kernel” platformasında yüksək riskli boşluqlar (CVE-2025-21756, CVE-2025-21863) aşkar olunub. #ETX #certaz #cybersecurity #kibertəhlükəsizlik #xəbərdarlıq https://t.co/1ekbqqT2Tc

    @CERTAzerbaijan

    11 Aug 2025

    37 Impressions

    0 Retweets

    0 Likes

    0 Bookmarks

    0 Replies

    0 Quotes

  2. #Kernel_Security #Offensive_security 1. Exploiting UAF in vsock subsystem of the Linux kernel (CVE-2025-21756) https://t.co/S2bRE1NMBv 2. Secure Enclaves for Offensive Operations Part 1 - https://t.co/XPXkP78F9G Part 2 - https://t.co/BU1cXSuMgN

    @ksg93rd

    18 Jun 2025

    177 Impressions

    0 Retweets

    1 Like

    1 Bookmark

    0 Replies

    0 Quotes

  3. Exploiting the CVE-2025-21756 1-day vulnerability @v4bel and @_qwerty_po posted a kernelCTF report about exploiting a UAF in the vsock subsystem of the Linux kernel: https://t.co/iw1O0ZivdG https://t.co/f8rC7YqAVC

    @linkersec

    17 Jun 2025

    6677 Impressions

    33 Retweets

    126 Likes

    45 Bookmarks

    1 Reply

    0 Quotes

  4. Use After Free Affecting kernel-64k-modules package, versions <0:5.14.0-284.117.1.el9_2 CVE-2025-21756 CWE-416 https://t.co/xYg3baxHAM

    @ytroncal

    1 Jun 2025

    10 Impressions

    0 Retweets

    0 Likes

    0 Bookmarks

    0 Replies

    0 Quotes

  5. This is an exploit for CVE-2025-21756. It is written for linux kernel 6.6.75. https://t.co/GtSpz0uem8

    @ytroncal

    28 May 2025

    32 Impressions

    0 Retweets

    0 Likes

    0 Bookmarks

    0 Replies

    0 Quotes

  6. Linux Kernel Exploitation: CVE-2025-21756 https://t.co/sxZszyt68J

    @akaclandestine

    23 May 2025

    958 Impressions

    2 Retweets

    8 Likes

    4 Bookmarks

    0 Replies

    0 Quotes

  7. CVE-2025-21756: Attack of the Vsock Michael Hoefler published an article about exploiting an incorrect reference counter decrement causing a UAF in the vsock subsystem. https://t.co/5QS9BE6tM6 https://t.co/o0SGVT2qwW

    @linkersec

    8 May 2025

    4752 Impressions

    30 Retweets

    101 Likes

    36 Bookmarks

    1 Reply

    0 Quotes

  8. この記事をおすすめしました "Linux Kernel Exploitation: CVE-2025-21756" via @techfeedapp #techfeed https://t.co/U4bZ7faNdC

    @hossuii

    3 May 2025

    58 Impressions

    0 Retweets

    0 Likes

    0 Bookmarks

    0 Replies

    0 Quotes

  9. CVE-2025-21756: การโจมตีของ Vsock - การแสวงหาประโยชน์ของลินุกซ์เคอร์เนล https://t.co/vgkIACkMt3

    @freedomhack101

    3 May 2025

    29 Impressions

    0 Retweets

    1 Like

    0 Bookmarks

    0 Replies

    0 Quotes

  10. به تازگی آسیب پذیری جدیدی با کد شناسایی CVE-2025-21756 برای کرنل لینوکس منتشر شده است. این آسیب پذیری که از نوع privilege escalation می باشد ، باعث ارتقای سطح دسترسی هکر به

    @AmirHossein_sec

    1 May 2025

    61 Impressions

    0 Retweets

    0 Likes

    0 Bookmarks

    0 Replies

    0 Quotes

  11. CVE-2025-21756: Attack of the Vsock https://t.co/vXcfat5KvA https://t.co/ejxfpxYwsu

    @secharvesterx

    1 May 2025

    122 Impressions

    0 Retweets

    0 Likes

    0 Bookmarks

    0 Replies

    0 Quotes

  12. Linux Kernel Exploitation (CVE-2025-21756) : Attack of the Vsock : https://t.co/w5Hs9WrXH5 Source code for the exploit : https://t.co/rRFNu6KBqd https://t.co/g4664kFGMY

    @binitamshah

    1 May 2025

    1938 Impressions

    2 Retweets

    18 Likes

    10 Bookmarks

    0 Replies

    0 Quotes

  13. Linux Kernel Exploitation (CVE-2025-21756) : Attack of the Vsock : https://t.co/w5Hs9WrXH5 Source code for the exploit : https://t.co/rRFNu6KBqd https://t.co/f77Dih300r

    @binitamshah

    1 May 2025

    1735 Impressions

    10 Retweets

    22 Likes

    6 Bookmarks

    1 Reply

    0 Quotes

  14. Linux Kernel Exploitation CVE-2025-21756: Attack of the Vsock https://t.co/AW4a3RR5R1

    @ytroncal

    30 Apr 2025

    20 Impressions

    0 Retweets

    0 Likes

    0 Bookmarks

    0 Replies

    0 Quotes

  15. Linux Kernel Exploitation: CVE-2025-21756 #HackerNews https://t.co/sx0qMiBHf2

    @hackernewstop5

    30 Apr 2025

    28 Impressions

    0 Retweets

    0 Likes

    0 Bookmarks

    0 Replies

    0 Quotes

  16. Linux Kernel Exploitation: CVE-2025-21756 https://t.co/gf0VDnPZmH 2

    @cevaboyz

    30 Apr 2025

    26 Impressions

    0 Retweets

    1 Like

    0 Bookmarks

    0 Replies

    0 Quotes

  17. ⚠️Múltiples vulnerabilidades del kernel de Linux Debian ❗CVE-2025-21756 ❗CVE-2025-21855 ❗CVE-2025-39735 ➡️Más info: https://t.co/oAUIMKsjS4 https://t.co/hyWEwL5d5T

    @CERTpy

    30 Apr 2025

    88 Impressions

    0 Retweets

    0 Likes

    0 Bookmarks

    0 Replies

    0 Quotes

  18. 🚨 #Linux Kernel Hacked: #CVE-2025-21756 – Exploiting the Vsock UAF for Root Access https://t.co/jfF1b8pjRv Educational Purposes!

    @UndercodeUpdate

    30 Apr 2025

    2 Impressions

    0 Retweets

    0 Likes

    0 Bookmarks

    0 Replies

    0 Quotes

  19. 🚨🐧Linux Kernel Hacked: CVE-2025-21756 – Exploiting the Vsock UAF for Root Access The Article Can Be Found Here https://t.co/rQ1iOMwugX https://t.co/fqFwkFLwKE

    @_zeus_dev_

    30 Apr 2025

    152 Impressions

    0 Retweets

    1 Like

    0 Bookmarks

    0 Replies

    1 Quote

  20. 🚨 Critical Linux Kernel vulnerability (CVE-2025-21756) in vsock module allows local #privilegeescalation to root. Affects cloud & container environments. Patch now! 📌 Read more: https://t.co/yuWDaKCMmN #CVE202521756 #Linux #CyberSecurity

    @threatsbank

    30 Apr 2025

    13 Impressions

    0 Retweets

    0 Likes

    0 Bookmarks

    0 Replies

    0 Quotes

  21. Linuxの権限昇格脆弱性CVE-2025-21756に対応するPoC(攻撃の概念実証コード)が公開された。カーネルのvsockサブシステムにおける解放後メモリ使用。脆弱なvsock_release()関数はAppArmor保護対象ではないため、ポイン

    @__kokumoto

    29 Apr 2025

    696 Impressions

    2 Retweets

    5 Likes

    1 Bookmark

    0 Replies

    0 Quotes

  22. Linux Kernel Exploitation: CVE-2025-21756 https://t.co/iEhP0meBFZ

    @takesako

    29 Apr 2025

    55 Impressions

    0 Retweets

    0 Likes

    0 Bookmarks

    0 Replies

    0 Quotes

  23. Actively exploited CVE : CVE-2025-21756

    @transilienceai

    29 Apr 2025

    21 Impressions

    0 Retweets

    0 Likes

    0 Bookmarks

    1 Reply

    0 Quotes

  24. 🔥 Linux Kernel Vulnerability Exposes Systems to Privilege Escalation Attacks Read more: https://t.co/ZatBxYAcpF A significant vulnerability in the Linux kernel’s Virtual Socket (vsock) implementation, designated as CVE-2025-21756, has been identified that could allow lo

    @The_Cyber_News

    29 Apr 2025

    389 Impressions

    3 Retweets

    4 Likes

    0 Bookmarks

    0 Replies

    0 Quotes

  25. CVE-2025-21756: How a Tiny Linux Kernel Bug Led to a Full Root Exploit, PoC Releases https://t.co/fJSTn5CaNq

    @Dinosn

    29 Apr 2025

    6152 Impressions

    45 Retweets

    153 Likes

    45 Bookmarks

    2 Replies

    1 Quote

  26. CVE-2025-21756: How a Tiny Linux Kernel Bug Led to a Full Root Exploit, PoC Releases https://t.co/az9sqf8NDL

    @the_yellow_fall

    29 Apr 2025

    5745 Impressions

    43 Retweets

    156 Likes

    62 Bookmarks

    0 Replies

    0 Quotes

  27. GitHub - hoefler02/CVE-2025-21756: My first linux kernel exploit https://t.co/BpYKlKvAbj

    @akaclandestine

    19 Apr 2025

    1037 Impressions

    1 Retweet

    13 Likes

    6 Bookmarks

    0 Replies

    0 Quotes

  28. GitHub - hoefler02/CVE-2025-21756: My first linux kernel exploit - https://t.co/azv5mktRGG

    @piedpiper1616

    19 Apr 2025

    697 Impressions

    4 Retweets

    10 Likes

    4 Bookmarks

    0 Replies

    0 Quotes

Configurations

  1. In the Linux kernel, the following vulnerability has been resolved: coresight: tmc-etr: Fix race condition between sysfs and perf mode When trying to run perf and sysfs mode simultaneously, the WARN_ON() in tmc_etr_enable_hw() is triggered sometimes: WARNING: CPU: 42 PID: 3911571 at drivers/hwtracing/coresight/coresight-tmc-etr.c:1060 tmc_etr_enable_hw+0xc0/0xd8 [coresight_tmc] [..snip..] Call trace: tmc_etr_enable_hw+0xc0/0xd8 [coresight_tmc] (P) tmc_enable_etr_sink+0x11c/0x250 [coresight_tmc] (L) tmc_enable_etr_sink+0x11c/0x250 [coresight_tmc] coresight_enable_path+0x1c8/0x218 [coresight] coresight_enable_sysfs+0xa4/0x228 [coresight] enable_source_store+0x58/0xa8 [coresight] dev_attr_store+0x20/0x40 sysfs_kf_write+0x4c/0x68 kernfs_fop_write_iter+0x120/0x1b8 vfs_write+0x2c8/0x388 ksys_write+0x74/0x108 __arm64_sys_write+0x24/0x38 el0_svc_common.constprop.0+0x64/0x148 do_el0_svc+0x24/0x38 el0_svc+0x3c/0x130 el0t_64_sync_handler+0xc8/0xd0 el0t_64_sync+0x1ac/0x1b0 ---[ end trace 0000000000000000 ]--- Since the enablement of sysfs mode is separeted into two critical regions, one for sysfs buffer allocation and another for hardware enablement, it's possible to race with the perf mode. Fix this by double check whether the perf mode's been used before enabling the hardware in sysfs mode. mode: [sysfs mode] [perf mode] tmc_etr_get_sysfs_buffer() spin_lock(&drvdata->spinlock) [sysfs buffer allocation] spin_unlock(&drvdata->spinlock) spin_lock(&drvdata->spinlock) tmc_etr_enable_hw() drvdata->etr_buf = etr_perf->etr_buf spin_unlock(&drvdata->spinlock) spin_lock(&drvdata->spinlock) tmc_etr_enable_hw() WARN_ON(drvdata->etr_buf) // WARN sicne etr_buf initialized at the perf side spin_unlock(&drvdata->spinlock) With this fix, we retain the check for CS_MODE_PERF in get_etr_sysfs_buf. This ensures we verify whether the perf mode's already running before we actually allocate the buffer. Then we can save the time of allocating/freeing the sysfs buffer if race with the perf mode.CVE-2026-46272