CVE-2024-36904: tcp: Use refcount_inc_not_zero() in tcp_twsk_unique().
Noroxi assessment
Priority: Monitor (action score 31/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.61% (FIRST EPSS).
- Someone with local access to the system can trigger it. A low-privileged account is enough. No user action is required. No special conditions are required; it is repeatable.
- Fixed version: Linux Linux 13ed7cdf079686ccd3618335205700c03f6fb446, 1796ca9c6f5bd50554214053af5f47d112818ee3, 1d9cf07810c30ef7948879567d10fd1f01121d34.
Low priority for now. Upgrade to Linux Linux 13ed7cdf079686ccd3618335205700c03f6fb446, 1796ca9c6f5bd50554214053af5f47d112818ee3, 1d9cf07810c30ef7948879567d10fd1f01121d34 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: tcp: Use refcount_inc_not_zero() in tcp_twsk_unique(). Anderson Nascimento reported a use-after-free splat in tcp_twsk_unique() with nice analysis. Since commit ec94c2696f0b ("tcp/dccp: avoid one atomic operation for timewait hashdance"), inet_twsk_hashdance() sets TIME-WAIT socket's sk_refcnt after putting it into ehash and releasing the bucket lock. Thus, there is a small race window where other threads could try to reuse the port during connect() and call sock_hold() in tcp_twsk_unique() for the TIME-WAIT socket with zero refcnt. If that happens, the refcnt taken by tcp_twsk_unique() is overwritten and sock_put() will cause underflow, triggering a real use-after-free somewhere else. To avoid the use-after-free, we need to use refcount_inc_not_zero() in tcp_twsk_unique() and give up on reusing the port if it returns false. [0]: refcount_t: addition on 0; use-after-free. WARNING: CPU: 0 PID: 1039313 at lib/refcount.c:25 refcount_warn_saturate+0xe5/0x110 CPU: 0 PID: 1039313 Comm: trigger Not tainted 6.8.6-200.fc39.x86_64 #1 Hardware name: VMware, Inc. VMware20,1/440BX Desktop Reference Platform, BIOS VMW201.00V.21805430.B64.2305221830 05/22/2023 RIP: 0010:refcount_warn_saturate+0xe5/0x110 Code: 42 8e ff 0f 0b c3 cc cc cc cc 80 3d aa 13 ea 01 00 0f 85 5e ff ff ff 48 c7 c7 f8 8e b7 82 c6 05 96 13 ea 01 01 e8 7b 42 8e ff <0f> 0b c3 cc cc cc cc 48 c7 c7 50 8f b7 82 c6 05 7a 13 ea 01 01 e8 RSP: 0018:ffffc90006b43b60 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffff888009bb3ef0 RCX: 0000000000000027 RDX: ffff88807be218c8 RSI: 0000000000000001 RDI: ffff88807be218c0 RBP: 0000000000069d70 R08: 0000000000000000 R09: ffffc90006b439f0 R10: ffffc90006b439e8 R11: 0000000000000003 R12: ffff8880029ede84 R13: 0000000000004e20 R14: ffffffff84356dc0 R15: ffff888009bb3ef0 FS: 00007f62c10926c0(0000) GS:ffff88807be00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000020ccb000 CR3: 000000004628c005 CR4: 0000000000f70ef0 PKRU: 55555554 Call Trace: <TASK> ? refcount_warn_saturate+0xe5/0x110 ? __warn+0x81/0x130 ? refcount_warn_saturate+0xe5/0x110 ? report_bug+0x171/0x1a0 ? refcount_warn_saturate+0xe5/0x110 ? handle_bug+0x3c/0x80 ? exc_invalid_op+0x17/0x70 ? asm_exc_invalid_op+0x1a/0x20 ? refcount_warn_saturate+0xe5/0x110 tcp_twsk_unique+0x186/0x190 __inet_check_established+0x176/0x2d0 __inet_hash_connect+0x74/0x7d0 ? __pfx___inet_check_established+0x10/0x10 tcp_v4_connect+0x278/0x530 __inet_stream_connect+0x10f/0x3d0 inet_stream_connect+0x3a/0x60 __sys_connect+0xa8/0xd0 __x64_sys_connect+0x18/0x20 do_syscall_64+0x83/0x170 entry_SYSCALL_64_after_hwframe+0x78/0x80 RIP: 0033:0x7f62c11a885d Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d a3 45 0c 00 f7 d8 64 89 01 48 RSP: 002b:00007f62c1091e58 EFLAGS: 00000296 ORIG_RAX: 000000000000002a RAX: ffffffffffffffda RBX: 0000000020ccb004 RCX: 00007f62c11a885d RDX: 0000000000000010 RSI: 0000000020ccb000 RDI: 0000000000000003 RBP: 00007f62c1091e90 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000296 R12: 00007f62c10926c0 R13: ffffffffffffff88 R14: 0000000000000000 R15: 00007ffe237885b0 </TASK>
- BDU:2024-04557
- ALSA-2024:4583
- DLA-3843-1
- DSA-5703-1
- RHSA-2024:4583
- RHSA-2024:5692
- RLSA-2024:4583
- SUSE-SU-2024:2385-1
- SUSE-SU-2024:2495-1
- SUSE-SU-2024:4120-1
- SUSE-SU-2024:4125-1
- SUSE-SU-2024:4127-1
- SUSE-SU-2024:4129-1
- SUSE-SU-2024:4141-1
- SUSE-SU-2024:4177-1
- SUSE-SU-2024:4179-1
- SUSE-SU-2024:4180-1
- SUSE-SU-2024:4206-1
- SUSE-SU-2024:4207-1
- SUSE-SU-2024:4208-1
- Published
- May 30, 2024
- Updated
- Oct 15, 2026
- EPSS
- 0.6% · 49th percentile
- CWE
- CWE-416
Report tools
Action score
31
Monitor
Low priority for now.
- CVSS
- 31 / 40 · 7.8 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 0.6%
CISA SSVC decision
- Exploitation
- none
- Automatable
- no
- Technical impact
- partial
Vulnrichment: CISA's decision-tree inputs.
CNA vs NVD score
- NVD
- 7.8
- CNA · Linux
- 7.8
- agree
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.
Running WordPress? Scan your site free with WP Lens
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 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 |
| debian | debian linux | cpe:2.3:o:debian:debian_linux |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- debian debian linux10.0
- linux linux kernel4.20 and later · before 5.4.276
- linux linux kernel5.5 and later · before 5.10.217
- linux linux kernel5.11 and later · before 5.15.159
- linux linux kernel4.16 and later · before 4.19.314
- linux linux kernel6.2 and later · before 6.6.31
- linux linux kernel6.7 and later · before 6.8.10
- linux linux kernel5.16 and later · before 6.1.91
- linux linux kernel6.9
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.16affected
- ec94c2696f0bcd5ae92a553244e4ac30d2171a2d and later · before 84546cc1aeeb4df3e444b18a4293c9823f974be9affected · git
- ec94c2696f0bcd5ae92a553244e4ac30d2171a2d and later · before 1796ca9c6f5bd50554214053af5f47d112818ee3affected · git
- ec94c2696f0bcd5ae92a553244e4ac30d2171a2d and later · before 1d9cf07810c30ef7948879567d10fd1f01121d34affected · git
- ec94c2696f0bcd5ae92a553244e4ac30d2171a2d and later · before 27b0284d8be182a81feb65581ab6a724dfd596e8affected · git
- ec94c2696f0bcd5ae92a553244e4ac30d2171a2d and later · before 13ed7cdf079686ccd3618335205700c03f6fb446affected · git
- ec94c2696f0bcd5ae92a553244e4ac30d2171a2d and later · before 6e48faad92be13166184d21506e4e54c79c13adcaffected · git
- ec94c2696f0bcd5ae92a553244e4ac30d2171a2d and later · before 517e32ea0a8c72202d0d8aa8df50a7cd3d6fdefcaffected · git
- ec94c2696f0bcd5ae92a553244e4ac30d2171a2d and later · before f2db7230f73a80dbb179deab78f88a7947f0ab7eaffected · git
- before 4.16not affected · semver
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| AlmaLinux:9 | bpftool | before 7.3.0-427.26.1.el9_4 | 7.3.0-427.26.1.el9_4 |
| AlmaLinux:9 | kernel | before 5.14.0-427.26.1.el9_4 | 5.14.0-427.26.1.el9_4 |
| AlmaLinux:9 | kernel-64k | before 5.14.0-427.26.1.el9_4 | 5.14.0-427.26.1.el9_4 |
| AlmaLinux:9 | kernel-64k-core | before 5.14.0-427.26.1.el9_4 | 5.14.0-427.26.1.el9_4 |
| AlmaLinux:9 | kernel-64k-debug | before 5.14.0-427.26.1.el9_4 | 5.14.0-427.26.1.el9_4 |
| AlmaLinux:9 | kernel-64k-debug-core | before 5.14.0-427.26.1.el9_4 | 5.14.0-427.26.1.el9_4 |
| AlmaLinux:9 | kernel-64k-debug-devel | before 5.14.0-427.26.1.el9_4 | 5.14.0-427.26.1.el9_4 |
| AlmaLinux:9 | kernel-64k-debug-devel-matched | before 5.14.0-427.26.1.el9_4 | 5.14.0-427.26.1.el9_4 |
| AlmaLinux:9 | kernel-64k-debug-modules | before 5.14.0-427.26.1.el9_4 | 5.14.0-427.26.1.el9_4 |
| AlmaLinux:9 | kernel-64k-debug-modules-core | before 5.14.0-427.26.1.el9_4 | 5.14.0-427.26.1.el9_4 |
| AlmaLinux:9 | kernel-64k-debug-modules-extra | before 5.14.0-427.26.1.el9_4 | 5.14.0-427.26.1.el9_4 |
| AlmaLinux:9 | kernel-64k-devel | before 5.14.0-427.26.1.el9_4 | 5.14.0-427.26.1.el9_4 |
| AlmaLinux:9 | kernel-64k-devel-matched | before 5.14.0-427.26.1.el9_4 | 5.14.0-427.26.1.el9_4 |
| AlmaLinux:9 | kernel-64k-modules | before 5.14.0-427.26.1.el9_4 | 5.14.0-427.26.1.el9_4 |
| AlmaLinux:9 | kernel-64k-modules-core | before 5.14.0-427.26.1.el9_4 | 5.14.0-427.26.1.el9_4 |
| AlmaLinux:9 | kernel-64k-modules-extra | before 5.14.0-427.26.1.el9_4 | 5.14.0-427.26.1.el9_4 |
| AlmaLinux:9 | kernel-abi-stablelists | before 5.14.0-427.26.1.el9_4 | 5.14.0-427.26.1.el9_4 |
| AlmaLinux:9 | kernel-core | before 5.14.0-427.26.1.el9_4 | 5.14.0-427.26.1.el9_4 |
| AlmaLinux:9 | kernel-cross-headers | before 5.14.0-427.26.1.el9_4 | 5.14.0-427.26.1.el9_4 |
| AlmaLinux:9 | kernel-debug | before 5.14.0-427.26.1.el9_4 | 5.14.0-427.26.1.el9_4 |
| AlmaLinux:9 | kernel-debug-core | before 5.14.0-427.26.1.el9_4 | 5.14.0-427.26.1.el9_4 |
| AlmaLinux:9 | kernel-debug-devel | before 5.14.0-427.26.1.el9_4 | 5.14.0-427.26.1.el9_4 |
| AlmaLinux:9 | kernel-debug-devel-matched | before 5.14.0-427.26.1.el9_4 | 5.14.0-427.26.1.el9_4 |
| AlmaLinux:9 | kernel-debug-modules | before 5.14.0-427.26.1.el9_4 | 5.14.0-427.26.1.el9_4 |
+96
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-36902May 30, 2024 · ipv6: fib6_rules: avoid possible NULL dereference in fib6_rule_action()22Monitor
- ← EarlierCVE-2024-36903May 30, 2024 · ipv6: Fix potential uninit-value access in __ip6_make_skb()22Monitor
- Later →CVE-2024-36905May 30, 2024 · tcp: defer shutdown(SEND_SHUTDOWN) for TCP_SYN_RECV sockets22Monitor
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 | 13ed7cdf079686ccd3618335205700c03f6fb446 | Vendor (CNA) |
| Linux Linux | 1796ca9c6f5bd50554214053af5f47d112818ee3 | Vendor (CNA) |
| Linux Linux | 1d9cf07810c30ef7948879567d10fd1f01121d34 | Vendor (CNA) |
| Linux Linux | 27b0284d8be182a81feb65581ab6a724dfd596e8 | Vendor (CNA) |
| Linux Linux | 517e32ea0a8c72202d0d8aa8df50a7cd3d6fdefc | Vendor (CNA) |
| Linux Linux | 6e48faad92be13166184d21506e4e54c79c13adc | Vendor (CNA) |
| Linux Linux | 84546cc1aeeb4df3e444b18a4293c9823f974be9 | Vendor (CNA) |
| Linux Linux | f2db7230f73a80dbb179deab78f88a7947f0ab7e | Vendor (CNA) |
| almalinux:bpftool | 7.3.0-427.26.1.el9_4 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:kernel | 5.14.0-427.26.1.el9_4 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:kernel-64k | 5.14.0-427.26.1.el9_4 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:kernel-64k-core | 5.14.0-427.26.1.el9_4 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:kernel-64k-debug | 5.14.0-427.26.1.el9_4 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:kernel-64k-debug-core | 5.14.0-427.26.1.el9_4 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:kernel-64k-debug-devel | 5.14.0-427.26.1.el9_4 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:kernel-64k-debug-devel-matched | 5.14.0-427.26.1.el9_4 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:kernel-64k-debug-modules | 5.14.0-427.26.1.el9_4 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:kernel-64k-debug-modules-core | 5.14.0-427.26.1.el9_4 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:kernel-64k-debug-modules-extra | 5.14.0-427.26.1.el9_4 · AlmaLinux:9 | Package registry (OSV) |
| almalinux:kernel-64k-devel | 5.14.0-427.26.1.el9_4 · AlmaLinux:9 | Package registry (OSV) |
| debian:linux | 6.1.94-1 · Debian:12 | Package registry (OSV) |
| debian:linux-5.10 | 5.10.218-1~deb10u1 · Debian:10 | Package registry (OSV) |
| red hat:bpftool-debuginfo | 0:7.3.0-427.26.1.el9_4 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| red hat:kernel-64k-debug-debuginfo | 0:5.14.0-427.26.1.el9_4 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| red hat:kernel-64k-debug-devel | 0:5.14.0-427.26.1.el9_4 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| red hat:kernel-64k-debug-devel-matched | 0:5.14.0-427.26.1.el9_4 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| red hat:kernel-64k-debuginfo | 0:5.14.0-427.26.1.el9_4 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| red hat:kernel-64k-devel | 0:5.14.0-427.26.1.el9_4 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| red hat:kernel-64k-devel-matched | 0:5.14.0-427.26.1.el9_4 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
| red hat:kernel-debug-debuginfo | 0:5.14.0-427.26.1.el9_4 · Red Hat:enterprise_linux:9::appstream | Package registry (OSV) |
+17
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.
- No special conditions are required; it is repeatable.
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
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- High
- Integrity impact
- High
- Availability impact
- High
Weakness class (CWE)
CWE-416 · Use After FreeCVSS vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
nvd-primary
Root cause
After a memory region is freed, another reference pointing to it is still used. By then, the same region may have been allocated for different data.
The bug in code
The whole CWE-416 classA representative example of this vulnerability class. Not the vendor's source code; it shows the faulty pattern and its fix.
Vulnerable
free(dev->buf);
/* ... another thread is still running ... */
process(dev->buf);Fixed
lock(&dev->lock);
free(dev->buf);
dev->buf = NULL;
unlock(&dev->lock);Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
MITRE has no CAPEC/ATT&CK mapping for this CWE.
Change log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (13 more)Show less
- git.kernel.org/stable/c/1796ca9c6f5bd50554214053af5f47d112818ee3
- git.kernel.org/stable/c/1d9cf07810c30ef7948879567d10fd1f01121d34
- git.kernel.org/stable/c/27b0284d8be182a81feb65581ab6a724dfd596e8
- git.kernel.org/stable/c/517e32ea0a8c72202d0d8aa8df50a7cd3d6fdefc
- git.kernel.org/stable/c/6e48faad92be13166184d21506e4e54c79c13adc
- git.kernel.org/stable/c/84546cc1aeeb4df3e444b18a4293c9823f974be9
- git.kernel.org/stable/c/f2db7230f73a80dbb179deab78f88a7947f0ab7e
- lists.debian.org/debian-lts-announce/2024/06/msg00019.html
- lists.debian.org/debian-lts-announce/2024/06/msg00020.html
- security.netapp.com/advisory/ntap-20240905-0004/
- cert-portal.siemens.com/productcert/html/ssa-265688.html
- cert-portal.siemens.com/productcert/html/ssa-398330.html
- cert-portal.siemens.com/productcert/html/ssa-613116.html
Vendor advisories and official records. Exploit/PoC links are deliberately left out.