CVE-2024-56664: bpf, sockmap: Fix race between element replace and close()
Noroxi assessment
Priority: Monitor (action score 28/100)
- The sources we track (CISA KEV, Exploit-DB, Metasploit, Nuclei, GitHub) show no public exploit code or exploitation in the wild.
- Probability of exploitation in the next 30 days: 0.17% (FIRST EPSS).
- Someone with local access to the system can trigger it. A low-privileged account is enough. No user action is required. Special conditions such as timing or configuration are required.
- Fixed version: Linux Linux 6deb9e85dc9a2ba4414b91c1b5b00b8415910890, b015f19fedd2e12283a8450dd0aefce49ec57015, b79a0d1e9a374d1b376933a354c4fcd01fce0365; azl3 kernel 6.6.64.2-9 on Azure Linux 3.0 6.6.76.1-1; azl3 kernel 6.6.76.1-1 on Azure Linux 3.0 6.6.76.1-1.
Low priority for now. Upgrade to Linux Linux 6deb9e85dc9a2ba4414b91c1b5b00b8415910890, b015f19fedd2e12283a8450dd0aefce49ec57015, b79a0d1e9a374d1b376933a354c4fcd01fce0365; azl3 kernel 6.6.64.2-9 on Azure Linux 3.0 6.6.76.1-1; azl3 kernel 6.6.76.1-1 on Azure Linux 3.0 6.6.76.1-1 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
In the Linux kernel, the following vulnerability has been resolved: bpf, sockmap: Fix race between element replace and close() Element replace (with a socket different from the one stored) may race with socket's close() link popping & unlinking. __sock_map_delete() unconditionally unrefs the (wrong) element: // set map[0] = s0 map_update_elem(map, 0, s0) // drop fd of s0 close(s0) sock_map_close() lock_sock(sk) (s0!) sock_map_remove_links(sk) link = sk_psock_link_pop() sock_map_unlink(sk, link) sock_map_delete_from_link // replace map[0] with s1 map_update_elem(map, 0, s1) sock_map_update_elem (s1!) lock_sock(sk) sock_map_update_common psock = sk_psock(sk) spin_lock(&stab->lock) osk = stab->sks[idx] sock_map_add_link(..., &stab->sks[idx]) sock_map_unref(osk, &stab->sks[idx]) psock = sk_psock(osk) sk_psock_put(sk, psock) if (refcount_dec_and_test(&psock)) sk_psock_drop(sk, psock) spin_unlock(&stab->lock) unlock_sock(sk) __sock_map_delete spin_lock(&stab->lock) sk = *psk // s1 replaced s0; sk == s1 if (!sk_test || sk_test == sk) // sk_test (s0) != sk (s1); no branch sk = xchg(psk, NULL) if (sk) sock_map_unref(sk, psk) // unref s1; sks[idx] will dangle psock = sk_psock(sk) sk_psock_put(sk, psock) if (refcount_dec_and_test()) sk_psock_drop(sk, psock) spin_unlock(&stab->lock) release_sock(sk) Then close(map) enqueues bpf_map_free_deferred, which finally calls sock_map_free(). This results in some refcount_t warnings along with a KASAN splat [1]. Fix __sock_map_delete(), do not allow sock_map_unref() on elements that may have been replaced. [1]: BUG: KASAN: slab-use-after-free in sock_map_free+0x10e/0x330 Write of size 4 at addr ffff88811f5b9100 by task kworker/u64:12/1063 CPU: 14 UID: 0 PID: 1063 Comm: kworker/u64:12 Not tainted 6.12.0+ #125 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Arch Linux 1.16.3-1-1 04/01/2014 Workqueue: events_unbound bpf_map_free_deferred Call Trace: <TASK> dump_stack_lvl+0x68/0x90 print_report+0x174/0x4f6 kasan_report+0xb9/0x190 kasan_check_range+0x10f/0x1e0 sock_map_free+0x10e/0x330 bpf_map_free_deferred+0x173/0x320 process_one_work+0x846/0x1420 worker_thread+0x5b3/0xf80 kthread+0x29e/0x360 ret_from_fork+0x2d/0x70 ret_from_fork_asm+0x1a/0x30 </TASK> Allocated by task 1202: 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 unix_create1+0x88/0x8a0 unix_create+0xc5/0x180 __sock_create+0x241/0x650 __sys_socketpair+0x1ce/0x420 __x64_sys_socketpair+0x92/0x100 do_syscall_64+0x93/0x180 entry_SYSCALL_64_after_hwframe+0x76/0x7e Freed by task 46: 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 sk_psock_destroy+0x73e/0xa50 process_one_work+0x846/0x1420 worker_thread+0x5b3/0xf80 kthread+0x29e/0x360 ret_from_fork+0x2d/0x70 ret_from_fork_asm+0x1a/0x30 The bu ---truncated---
- BDU:2025-04674
- DSA-5860-1
- SUSE-SU-2025:02601-1
- SUSE-SU-2025:02604-1
- SUSE-SU-2025:02607-1
- SUSE-SU-2025:02610-1
- SUSE-SU-2025:02618-1
- SUSE-SU-2025:02627-1
- SUSE-SU-2025:02632-1
- SUSE-SU-2025:02636-1
- SUSE-SU-2025:02638-1
- SUSE-SU-2025:02648-1
- SUSE-SU-2025:02652-1
- SUSE-SU-2025:02673-1
- SUSE-SU-2025:02688-1
- SUSE-SU-2025:02691-1
- SUSE-SU-2025:02697-1
- SUSE-SU-2025:02698-1
- SUSE-SU-2025:0555-1
- SUSE-SU-2025:0576-1
- Published
- Dec 27, 2024
- Updated
- Oct 15, 2026
- EPSS
- 0.1% · 7th percentile
- CWE
- CWE-362
Report tools
Action score
28
Low priority for now.
- CVSS
- 28 / 40 · 7.0 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 0.1%
CISA SSVC decision
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
Vulnrichment: CISA's decision-tree inputs.
CNA vs NVD score
- NVD
- 7.0
- CNA · Linux
- 7.8
- 0.8 point gap
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- No public exploit code on record
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Is your version affected? Check itNoroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| linux | linux kernel | cpe:2.3:o:linux:linux_kernel |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- linux linux kernel4.20 and later · before 6.6.67
- linux linux kernel6.7 and later · before 6.12.6
- linux linux kernel6.13
Versions reported by the vendor
Affected version ranges reported by the assigning authority (Linux). Independent of NVD's CPE analysis and usually ahead of it.
Linux Linux
- 4.20affected
- 604326b41a6fb9b4a78b6179335decee0365cd8c and later · before 6deb9e85dc9a2ba4414b91c1b5b00b8415910890affected · git
- 604326b41a6fb9b4a78b6179335decee0365cd8c and later · before fdb2cd8957ac51f84c9e742ba866087944bb834baffected · git
- 604326b41a6fb9b4a78b6179335decee0365cd8c and later · before b79a0d1e9a374d1b376933a354c4fcd01fce0365affected · git
- 604326b41a6fb9b4a78b6179335decee0365cd8c and later · before b015f19fedd2e12283a8450dd0aefce49ec57015affected · git
- 604326b41a6fb9b4a78b6179335decee0365cd8c and later · before bf2318e288f636a882eea39f7e1015623629f168affected · git
- 604326b41a6fb9b4a78b6179335decee0365cd8c and later · before ed1fc5d76b81a4d681211333c026202cad4d5649affected · git
- before 4.20not affected · semver
- 5.10.236 and later · up to and including 5.10.*not affected · semver
- 5.15.180 and later · up to and including 5.15.*not affected · semver
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Debian:12 | linux | before 6.1.128-1 | 6.1.128-1 |
| Debian:13 | linux | before 6.12.6-1 | 6.12.6-1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | kernel-64kb | before 5.3.18-150300.59.195.1 | 5.3.18-150300.59.195.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | kernel-default-base | before 5.3.18-150300.59.195.1.150300.18.116.1 | 5.3.18-150300.59.195.1.150300.18.116.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | kernel-docs | before 5.3.18-150300.59.195.1 | 5.3.18-150300.59.195.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | kernel-obs-build | before 5.3.18-150300.59.195.1 | 5.3.18-150300.59.195.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | kernel-preempt | before 5.3.18-150300.59.195.1 | 5.3.18-150300.59.195.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | kernel-source | before 5.3.18-150300.59.195.1 | 5.3.18-150300.59.195.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSS | kernel-syms | before 5.3.18-150300.59.195.1 | 5.3.18-150300.59.195.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | kernel-64kb | before 5.14.21-150400.24.150.1 | 5.14.21-150400.24.150.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | kernel-docs | before 5.14.21-150400.24.150.1 | 5.14.21-150400.24.150.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | kernel-obs-build | before 5.14.21-150400.24.150.1 | 5.14.21-150400.24.150.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | kernel-source | before 5.14.21-150400.24.150.1 | 5.14.21-150400.24.150.1 |
| SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOS | kernel-syms | before 5.14.21-150400.24.150.1 | 5.14.21-150400.24.150.1 |
| SUSE:Linux Enterprise Live Patching 12 SP5 | kgraft-patch-SLE12-SP5_Update_58 | before 15-2.1 | 15-2.1 |
| SUSE:Linux Enterprise Live Patching 12 SP5 | kgraft-patch-SLE12-SP5_Update_60 | before 13-2.1 | 13-2.1 |
| SUSE:Linux Enterprise Live Patching 12 SP5 | kgraft-patch-SLE12-SP5_Update_61 | before 12-2.1 | 12-2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP3 | kernel-default | before 5.3.18-150300.59.195.1 | 5.3.18-150300.59.195.1 |
| SUSE:Linux Enterprise Live Patching 15 SP3 | kernel-livepatch-SLE15-SP3_Update_46 | before 17-150300.2.1 | 17-150300.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP3 | kernel-livepatch-SLE15-SP3_Update_47 | before 15-150300.2.1 | 15-150300.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP3 | kernel-livepatch-SLE15-SP3_Update_48 | before 14-150300.2.1 | 14-150300.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP3 | kernel-livepatch-SLE15-SP3_Update_50 | before 11-150300.2.1 | 11-150300.2.1 |
| SUSE:Linux Enterprise Live Patching 15 SP3 | kernel-livepatch-SLE15-SP3_Update_54 | before 1-150300.7.3.1 | 1-150300.7.3.1 |
| SUSE:Linux Enterprise Live Patching 15 SP4 | kernel-livepatch-SLE15-SP4_Update_28 | before 16-150400.2.1 | 16-150400.2.1 |
+25
Same product
linux: all recordsOther highest-scoring records for the same primary product.
- CVE-2026-31431crypto: algif_aead - Revert to operating out-of-placeKEV90Now
- CVE-2022-0847A flaw was found in the way the "flags" member of the new pipe buffer structure was lacking proper initialization in copy_page_to_iter_pipe…KEV89Now
- CVE-2021-22555Heap Out-Of-Bounds Write in Netfilter IP6T_SO_SET_REPLACEKEV85Now
Published before and after this one in the same product
- ← EarlierCVE-2024-56650Dec 27, 2024 · netfilter: x_tables: fix LED ID check in led_tg_check()28Monitor
- ← EarlierCVE-2024-56657Dec 27, 2024 · ALSA: control: Avoid WARN() for symlink errors22Monitor
- Later →CVE-2024-56672Dec 27, 2024 · blk-cgroup: Fix UAF in blkcg_unpin_online()28Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| Linux Linux | 6deb9e85dc9a2ba4414b91c1b5b00b8415910890 | Vendor (CNA) |
| Linux Linux | b015f19fedd2e12283a8450dd0aefce49ec57015 | Vendor (CNA) |
| Linux Linux | b79a0d1e9a374d1b376933a354c4fcd01fce0365 | Vendor (CNA) |
| Linux Linux | bf2318e288f636a882eea39f7e1015623629f168 | Vendor (CNA) |
| Linux Linux | ed1fc5d76b81a4d681211333c026202cad4d5649 | Vendor (CNA) |
| Linux Linux | fdb2cd8957ac51f84c9e742ba866087944bb834b | Vendor (CNA) |
| azl3 kernel 6.6.64.2-9 on Azure Linux 3.0 | 6.6.76.1-1 · CBL-Mariner Releases | Microsoft (MSRC) |
| azl3 kernel 6.6.76.1-1 on Azure Linux 3.0 | 6.6.76.1-1 · CBL-Mariner Releases | Microsoft (MSRC) |
| cbl2 kernel 5.15.180.1-1 on CBL Mariner 2.0 | 5.15.180.1-1 · CBL-Mariner Releases | Microsoft (MSRC) |
| cbl2 kernel 5.15.182.1-1 on CBL Mariner 2.0 | CBL-Mariner Releases | Microsoft (MSRC) |
| cbl2 kernel 5.15.182.1-1 on CBL-Mariner 2.0 | 5.15.180.1-1 · CBL-Mariner Releases | Microsoft (MSRC) |
| debian:linux | 6.1.128-1 · Debian:12 | Package registry (OSV) |
| suse:kernel-livepatch-SLE15-SP3_Update_46 | 17-150300.2.1 · SUSE:Linux Enterprise Live Patching 15 SP3 | Package registry (OSV) |
| suse:kernel-livepatch-SLE15-SP3_Update_47 | 15-150300.2.1 · SUSE:Linux Enterprise Live Patching 15 SP3 | Package registry (OSV) |
| suse:kernel-livepatch-SLE15-SP3_Update_48 | 14-150300.2.1 · SUSE:Linux Enterprise Live Patching 15 SP3 | Package registry (OSV) |
| suse:kernel-livepatch-SLE15-SP4_Update_28 | 16-150400.2.1 · SUSE:Linux Enterprise Live Patching 15 SP4 | Package registry (OSV) |
| suse:kernel-livepatch-SLE15-SP4_Update_34 | 10-150400.2.1 · SUSE:Linux Enterprise Live Patching 15 SP4 | Package registry (OSV) |
| suse:kernel-livepatch-SLE15-SP4_Update_35 | 9-150400.2.1 · SUSE:Linux Enterprise Live Patching 15 SP4 | Package registry (OSV) |
| suse:kernel-livepatch-SLE15-SP6-RT_Update_0 | 19-150600.3.1 · SUSE:Linux Enterprise Live Patching 15 SP6 | Package registry (OSV) |
| suse:kernel-livepatch-SLE15-SP6-RT_Update_1 | 18-150600.2.1 · SUSE:Linux Enterprise Live Patching 15 SP6 | Package registry (OSV) |
| suse:kernel-livepatch-SLE15-SP6-RT_Update_2 | 14-150600.2.1 · SUSE:Linux Enterprise Live Patching 15 SP6 | Package registry (OSV) |
| suse:kgraft-patch-SLE12-SP5_Update_58 | 15-2.1 · SUSE:Linux Enterprise Live Patching 12 SP5 | Package registry (OSV) |
| suse:kgraft-patch-SLE12-SP5_Update_60 | 13-2.1 · SUSE:Linux Enterprise Live Patching 12 SP5 | Package registry (OSV) |
| suse:kgraft-patch-SLE12-SP5_Update_61 | 12-2.1 · SUSE:Linux Enterprise Live Patching 12 SP5 | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
No history yet (it accumulates with the daily EPSS job).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
No commit or PR link among the references.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
No credits in the CNA record.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
No nightly-computed relations.
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
Technical details
Attack conditions
- Someone with local access to the system can trigger it.
- A low-privileged account is enough.
- No user action is required.
- Special conditions such as timing or configuration are required.
If successful
- Confidentiality
- high · data can be read
- Integrity
- high · data or configuration can be modified
- Availability
- high · the service can be disrupted
- Attack vector
- Local
- Attack complexity
- High
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- High
- Integrity impact
- High
- Availability impact
- High
Weakness class (CWE)
CWE-362 · Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')CVSS vector
CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
nvd-primary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
ATT&CK techniques
—
Change log
- SSVC exploitation— → none
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (7 more)Show less
- git.kernel.org/stable/c/b015f19fedd2e12283a8450dd0aefce49ec57015
- git.kernel.org/stable/c/b79a0d1e9a374d1b376933a354c4fcd01fce0365
- git.kernel.org/stable/c/bf2318e288f636a882eea39f7e1015623629f168
- git.kernel.org/stable/c/ed1fc5d76b81a4d681211333c026202cad4d5649
- git.kernel.org/stable/c/fdb2cd8957ac51f84c9e742ba866087944bb834b
- lists.debian.org/debian-lts-announce/2025/03/msg00001.html
- lists.debian.org/debian-lts-announce/2025/05/msg00030.html
Vendor advisories and official records. Exploit/PoC links are deliberately left out.