Skip to content
Noroxi
NVD / CVE Program· CNA Linux

CVE-2024-56664: bpf, sockmap: Fix race between element replace and close()

HighCVSS 7.0 · v3.1—No exploit Fix available

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

Published
Dec 27, 2024
Updated
Oct 15, 2026
EPSS
0.1% · 7th percentile

Report tools

JSON

Action score

28

Monitor

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.

Follow CVE-2024-56664

When you'll hear from us

  • when it enters CISA KEV
  • when exploit code appears or is weaponized
  • when the record is updated (including a fixed version)
  • when EPSS rises 20 points in a week

One daily email digest (06:00 UTC); connect a webhook for KEV listings and weaponized exploits every 10 minutes on paid plans, on the hour on the free plan.

Your free account also gets you

  • Stack alerts: add the products and versions you run, get the new CVEs that affect them
  • Uptime monitoring: 1 site, instant email when it goes down
  • Add your domain: subdomains and takeover risk scanned every week (1 domain)
  • 10 scans an hour on the security tools, at most 30 a day (3 a day without an account), an API key and MCP
  • All your scans in one panel: findings, what changed in the last scan, a report per domain or per client (PDF, share link)
All free tools

Sign up with email · Have an account? Sign in

Free account, no card. Unfollow any time.

Is your version affected? Check it

Noroxi 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 help

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

VendorProduct
linuxlinux 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.

EcosystemPackageAffected rangeFix
Debian:12linuxbefore 6.1.128-16.1.128-1
Debian:13linuxbefore 6.12.6-16.12.6-1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSSkernel-64kbbefore 5.3.18-150300.59.195.15.3.18-150300.59.195.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSSkernel-default-basebefore 5.3.18-150300.59.195.1.150300.18.116.15.3.18-150300.59.195.1.150300.18.116.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSSkernel-docsbefore 5.3.18-150300.59.195.15.3.18-150300.59.195.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSSkernel-obs-buildbefore 5.3.18-150300.59.195.15.3.18-150300.59.195.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSSkernel-preemptbefore 5.3.18-150300.59.195.15.3.18-150300.59.195.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSSkernel-sourcebefore 5.3.18-150300.59.195.15.3.18-150300.59.195.1
SUSE:Linux Enterprise High Performance Computing 15 SP3-LTSSkernel-symsbefore 5.3.18-150300.59.195.15.3.18-150300.59.195.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOSkernel-64kbbefore 5.14.21-150400.24.150.15.14.21-150400.24.150.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOSkernel-docsbefore 5.14.21-150400.24.150.15.14.21-150400.24.150.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOSkernel-obs-buildbefore 5.14.21-150400.24.150.15.14.21-150400.24.150.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOSkernel-sourcebefore 5.14.21-150400.24.150.15.14.21-150400.24.150.1
SUSE:Linux Enterprise High Performance Computing 15 SP4-ESPOSkernel-symsbefore 5.14.21-150400.24.150.15.14.21-150400.24.150.1
SUSE:Linux Enterprise Live Patching 12 SP5kgraft-patch-SLE12-SP5_Update_58before 15-2.115-2.1
SUSE:Linux Enterprise Live Patching 12 SP5kgraft-patch-SLE12-SP5_Update_60before 13-2.113-2.1
SUSE:Linux Enterprise Live Patching 12 SP5kgraft-patch-SLE12-SP5_Update_61before 12-2.112-2.1
SUSE:Linux Enterprise Live Patching 15 SP3kernel-defaultbefore 5.3.18-150300.59.195.15.3.18-150300.59.195.1
SUSE:Linux Enterprise Live Patching 15 SP3kernel-livepatch-SLE15-SP3_Update_46before 17-150300.2.117-150300.2.1
SUSE:Linux Enterprise Live Patching 15 SP3kernel-livepatch-SLE15-SP3_Update_47before 15-150300.2.115-150300.2.1
SUSE:Linux Enterprise Live Patching 15 SP3kernel-livepatch-SLE15-SP3_Update_48before 14-150300.2.114-150300.2.1
SUSE:Linux Enterprise Live Patching 15 SP3kernel-livepatch-SLE15-SP3_Update_50before 11-150300.2.111-150300.2.1
SUSE:Linux Enterprise Live Patching 15 SP3kernel-livepatch-SLE15-SP3_Update_54before 1-150300.7.3.11-150300.7.3.1
SUSE:Linux Enterprise Live Patching 15 SP4kernel-livepatch-SLE15-SP4_Update_28before 16-150400.2.116-150400.2.1

+25

Other highest-scoring records for the same primary product.

  • CVE-2026-31431crypto: algif_aead - Revert to operating out-of-placeKEV
    90Now
  • 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…KEV
    89Now
  • CVE-2021-22555Heap Out-Of-Bounds Write in Netfilter IP6T_SO_SET_REPLACEKEV
    85Now

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 errors
    22Monitor
  • 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 / packageFixed versionSource
Linux Linux6deb9e85dc9a2ba4414b91c1b5b00b8415910890Vendor (CNA)
Linux Linuxb015f19fedd2e12283a8450dd0aefce49ec57015Vendor (CNA)
Linux Linuxb79a0d1e9a374d1b376933a354c4fcd01fce0365Vendor (CNA)
Linux Linuxbf2318e288f636a882eea39f7e1015623629f168Vendor (CNA)
Linux Linuxed1fc5d76b81a4d681211333c026202cad4d5649Vendor (CNA)
Linux Linuxfdb2cd8957ac51f84c9e742ba866087944bb834bVendor (CNA)
azl3 kernel 6.6.64.2-9 on Azure Linux 3.06.6.76.1-1 · CBL-Mariner ReleasesMicrosoft (MSRC)
azl3 kernel 6.6.76.1-1 on Azure Linux 3.06.6.76.1-1 · CBL-Mariner ReleasesMicrosoft (MSRC)
cbl2 kernel 5.15.180.1-1 on CBL Mariner 2.05.15.180.1-1 · CBL-Mariner ReleasesMicrosoft (MSRC)
cbl2 kernel 5.15.182.1-1 on CBL Mariner 2.0CBL-Mariner ReleasesMicrosoft (MSRC)
cbl2 kernel 5.15.182.1-1 on CBL-Mariner 2.05.15.180.1-1 · CBL-Mariner ReleasesMicrosoft (MSRC)
debian:linux6.1.128-1 · Debian:12Package registry (OSV)
suse:kernel-livepatch-SLE15-SP3_Update_4617-150300.2.1 · SUSE:Linux Enterprise Live Patching 15 SP3Package registry (OSV)
suse:kernel-livepatch-SLE15-SP3_Update_4715-150300.2.1 · SUSE:Linux Enterprise Live Patching 15 SP3Package registry (OSV)
suse:kernel-livepatch-SLE15-SP3_Update_4814-150300.2.1 · SUSE:Linux Enterprise Live Patching 15 SP3Package registry (OSV)
suse:kernel-livepatch-SLE15-SP4_Update_2816-150400.2.1 · SUSE:Linux Enterprise Live Patching 15 SP4Package registry (OSV)
suse:kernel-livepatch-SLE15-SP4_Update_3410-150400.2.1 · SUSE:Linux Enterprise Live Patching 15 SP4Package registry (OSV)
suse:kernel-livepatch-SLE15-SP4_Update_359-150400.2.1 · SUSE:Linux Enterprise Live Patching 15 SP4Package registry (OSV)
suse:kernel-livepatch-SLE15-SP6-RT_Update_019-150600.3.1 · SUSE:Linux Enterprise Live Patching 15 SP6Package registry (OSV)
suse:kernel-livepatch-SLE15-SP6-RT_Update_118-150600.2.1 · SUSE:Linux Enterprise Live Patching 15 SP6Package registry (OSV)
suse:kernel-livepatch-SLE15-SP6-RT_Update_214-150600.2.1 · SUSE:Linux Enterprise Live Patching 15 SP6Package registry (OSV)
suse:kgraft-patch-SLE12-SP5_Update_5815-2.1 · SUSE:Linux Enterprise Live Patching 12 SP5Package registry (OSV)
suse:kgraft-patch-SLE12-SP5_Update_6013-2.1 · SUSE:Linux Enterprise Live Patching 12 SP5Package registry (OSV)
suse:kgraft-patch-SLE12-SP5_Update_6112-2.1 · SUSE:Linux Enterprise Live Patching 12 SP5Package 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.

Finders, 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

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.

Change log

  1. SSVC exploitation— → none
  2. Fix✗ → ✓

For records you follow, these changes also arrive as notifications. →

References

All records