CVE-2025-38617

Published Aug 22, 2025

Last updated 12 days ago

Overview

AI description

Automated description summarized from trusted sources.

CVE-2025-38617 describes a race condition vulnerability found within the Linux kernel's networking subsystem. Specifically, the flaw occurs in the `net/packet` module during the interaction between the `packet_set_ring()` and `packet_notifier()` functions. The vulnerability arises when `packet_set_ring()` releases the `po->bind_lock`, which can allow a separate thread to execute `packet_notifier()` and process an `NETDEV_UP` event. This race condition is analogous to a previously addressed issue. The resolution involves temporarily setting `po->num` to zero, ensuring the socket remains unhooked until the lock is reacquired.

Description
In the Linux kernel, the following vulnerability has been resolved: net/packet: fix a race in packet_set_ring() and packet_notifier() When packet_set_ring() releases po->bind_lock, another thread can run packet_notifier() and process an NETDEV_UP event. This race and the fix are both similar to that of commit 15fe076edea7 ("net/packet: fix a race in packet_bind() and packet_notifier()"). There too the packet_notifier NETDEV_UP event managed to run while a po->bind_lock critical section had to be temporarily released. And the fix was similarly to temporarily set po->num to zero to keep the socket unhooked until the lock is retaken. The po->bind_lock in packet_set_ring and packet_notifier precede the introduction of git history.
Source
416baaa9-dc9f-4396-8d5f-8c081fb06d67
NVD status
Modified
Products
linux_kernel, debian_linux

Risk scores

CVSS 3.1

Type
Primary
Base score
4.7
Impact score
3.6
Exploitability score
1
Vector string
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
Severity
MEDIUM

Weaknesses

nvd@nist.gov
CWE-362

Social media

Hype score
Not currently trending
  1. Exploiting a use-after-free vulnerability in the Linux kernel’s packet socket subsystem, caused by a race condition between packet_set_ring() and packet_notifier() (CVE-2025-38617) https://t.co/F86BqcWmYk #infosec https://t.co/i8re1JTtT2

    @0xor0ne

    12 Apr 2026

    5999 Impressions

    24 Retweets

    119 Likes

    61 Bookmarks

    1 Reply

    0 Quotes

  2. A Race Within A Race: Exploiting CVE-2025-38617 in Linux Packet Sockets https://t.co/r5rJhupZPm

    @Komodosec

    6 Apr 2026

    160 Impressions

    1 Retweet

    0 Likes

    0 Bookmarks

    0 Replies

    0 Quotes

  3. A Race Within A Race: Exploiting CVE-2025-38617 in Linux Packet Sockets.. A step-by-step guide to exploiting a 20-year-old bug in the Linux kernel..  https://t.co/2ZIj4pf629

    @Tinolle1955

    26 Mar 2026

    721 Impressions

    1 Retweet

    11 Likes

    7 Bookmarks

    0 Replies

    0 Quotes

  4. A Race Within a Race: Exploiting CVE-2025-38617 in Linux Packet Sockets https://t.co/Guhe2dTHrm

    @angsuman

    21 Mar 2026

    103 Impressions

    0 Retweets

    0 Likes

    0 Bookmarks

    0 Replies

    0 Quotes

  5. Exploitation of CVE-2025-38617 in Linux Packet Sockets The article examines the exploitation of a race condition vulnerability in the Linux kernel’s packet socket subsystem (CVE-2025-38617 -> (https://t.co/WsSNB0cYmd)). The flaw allows an attacker to achieve local privilege

    @ptdbugs

    17 Mar 2026

    136 Impressions

    0 Retweets

    0 Likes

    0 Bookmarks

    0 Replies

    0 Quotes

  6. A Race Within A Race: Exploiting CVE-2025-38617 in Linux Packet Sockets Excellent article by Quang Le about exploiting CVE-2025-38617 — a race condition that leads to a use-after-free in the packet sockets implementation. https://t.co/aSys46Iit8 https://t.co/uRXwbhCRDf

    @linkersec

    17 Mar 2026

    4361 Impressions

    12 Retweets

    87 Likes

    44 Bookmarks

    2 Replies

    0 Quotes

  7. CVE-2025-38617 es una vulnerabilidad use-after-free en el subsistema de packet sockets del kernel Linux, causada por una race condition. El bug existía desde Linux 2.6.12 (2005) y fue corregido en la versión 6.16. 20 años en producción. Sin que nadie lo viera ¿Cuántos + ha

    @Zymeralabs

    12 Mar 2026

    108 Impressions

    0 Retweets

    0 Likes

    0 Bookmarks

    0 Replies

    0 Quotes

  8. Top 5 Trending CVEs: 1 - CVE-2025-54236 2 - CVE-2025-38617 3 - CVE-2026-21513 4 - CVE-2026-3102 5 - CVE-2017-7921 #cve #cvetrends #cveshield #cybersecurity https://t.co/4Fua3CAN6W

    @CVEShield

    10 Mar 2026

    173 Impressions

    0 Retweets

    1 Like

    0 Bookmarks

    0 Replies

    0 Quotes

  9. Analysis and exploitation of CVE-2025-38617, a race condition based use-after-free vulnerability in the Linux kernel’s packet socket subsystem (@calif_io) https://t.co/F86BqcWmYk #Linux #infosec https://t.co/Q6oWLni1KA

    @0xor0ne

    9 Mar 2026

    4873 Impressions

    20 Retweets

    101 Likes

    46 Bookmarks

    1 Reply

    0 Quotes

  10. Exploiting CVE-2025-38617 in Linux Packet Sockets https://t.co/SJxKtKR784

    @Dinosn

    7 Mar 2026

    1730 Impressions

    3 Retweets

    17 Likes

    9 Bookmarks

    1 Reply

    0 Quotes

  11. A Race Within A Race: Exploiting CVE-2025-38617 in Linux Packet Sockets https://t.co/SJxKtKR784

    @Dinosn

    7 Mar 2026

    1665 Impressions

    3 Retweets

    19 Likes

    7 Bookmarks

    0 Replies

    0 Quotes

  12. CVE-2025-38617 vulnerability allows attackers to exploit Linux packet sockets, potentially leading to privilege escalation. https://t.co/jELT5q6mWD

    @Crash0verr1d3

    7 Mar 2026

    70 Impressions

    0 Retweets

    0 Likes

    0 Bookmarks

    1 Reply

    0 Quotes

  13. A Race Within A Race: Exploiting CVE-2025-38617 in Linux Packet Sockets https://t.co/cohac2JCu3

    @_r_netsec

    6 Mar 2026

    786 Impressions

    1 Retweet

    7 Likes

    3 Bookmarks

    0 Replies

    0 Quotes

  14. Top 5 Trending CVEs: 1 - CVE-2024-23222 2 - CVE-2026-22719 3 - CVE-2026-25611 4 - CVE-2025-38617 5 - CVE-2026-21902 #cve #cvetrends #cveshield #cybersecurity https://t.co/4Fua3CAN6W

    @CVEShield

    5 Mar 2026

    232 Impressions

    0 Retweets

    1 Like

    0 Bookmarks

    0 Replies

    0 Quotes

  15. #exploit #Kernel_Security A Race Within A Race: Exploiting CVE-2025-38617 in Linux Packet Sockets https://t.co/oavL2He7Ll // A step-by-step guide to exploiting a 20-year-old bug in the Linux kernel to achieve full privilege escalation and container escape, plus a cool bug-hunting

    @ksg93rd

    4 Mar 2026

    531 Impressions

    2 Retweets

    10 Likes

    2 Bookmarks

    0 Replies

    0 Quotes

  16. 20年以上潜伏していたLinuxカーネルの欠陥が、ついに特権昇格とコンテナ脱出を可能にする深刻な脆弱性として明らかになった。単純な競合条件が高度な防御機構を突破する実証も示された。 CVE-2025-38617は、Li

    @yousukezan

    3 Mar 2026

    32362 Impressions

    196 Retweets

    465 Likes

    208 Bookmarks

    3 Replies

    3 Quotes

  17. A Race Within A Race: Exploiting CVE-2025-38617 in Linux Packet Sockets. A step-by-step guide to exploiting a 20-year-old bug in the Linux kernel to achieve full privilege escalation and container escape, plus a cool bug-hunting heuristic. https://t.co/IxURrHpBT0

    @calif_io

    3 Mar 2026

    7382 Impressions

    37 Retweets

    114 Likes

    71 Bookmarks

    3 Replies

    0 Quotes

  18. CVE-2025-38617 In the Linux kernel, the following vulnerability has been resolved: net/packet: fix a race in packet_set_ring() and packet_notifier() When packet_set_ring() release… https://t.co/aKmKSqg5Ei

    @CVEnew

    22 Aug 2025

    261 Impressions

    0 Retweets

    0 Likes

    0 Bookmarks

    0 Replies

    0 Quotes

Configurations

  1. In the Linux kernel, the following vulnerability has been resolved: cgroup: Avoid iteration of dying tasks with zero refcount The commit 260fbcb92bbea ("cgroup: Move dying_tasks cleanup from cgroup_task_release() to cgroup_task_free()") extended the lifetime of tasks on the dying_tasks list. The iterators have provision to go through dying_tasks because of dying threadgroup leaders or explicit CSS_TASK_ITER_WITH_DEAD, however, it was expected that such tasks can obtain a new reference (that is possible before cgroup_task_release()/put_task_struct_rcu_user()). The tasks after cgroup_task_release() and before cgroup_task_free() are subject to race when they may or may not have ->usage count > 0. The race window is between css_task_iter_next() invocations when css_set_lock is released and we may arrive at a new ->task_pos. The iterator should not attempt to resurrect tasks whose ->usage count dropped to zero. (When that happens, __put_task_struct_rcu_cb() is already imminent and the returned task_struct would could be used after free.) As for the fix, we cannot simply check the signal->live count of a task on the dying list because that won't distinguish regular zombies waiting to be reaped from RCU remnant tasks that are going to be free'd. Therefore add an extra check to rule out ->usage==0 tasks from any iteration. The repeat: loop in css_task_iter_advance() doesn't consider ->usage count, so add a new loop to css_task_iter_next() to skip de-used tasks on the dying_list. Rough illustration of the possible race R (reader of cgroup.procs) T (thread) L (group leader) --------------------------------- -------------------------------- -------------------------------- L exits, signal->live > 0 cgroup_task_dead(L) css_set_skip_task_iters() // skips only cset->tasks list_add_tail(&L->cg_list, &cset->dying_tasks) css_task_iter_next() take css_set_lock css_task_iter_advance() leader && signal->live != 0 => it->task_pos = &L->cg_list release css_set_lock T exits --signal->live == 0 cgroup_task_dead(T) // css_set_lock release_task(T) cgroup_task_release(T) release_task(L) // zap_leader cgroup_task_release(L) put_task_struct_rcu_user(L) ...RCU... put_task_struct(L) L->usage = 0 /* L still on dying_tasks */ ...RCU... __put_task_struct(L) css_task_iter_next() // another iteration take css_set_lock it->task_pos = &L->cg_list get_task_struct(L) => addition on 0 drop css_set_lock cgroup_task_free(L) css_set_skip_task_iters() // dying skip comes too late free_task(L) cgroup_procs_show() task_pid_vnr(L)•CVE-2026-98163