# CVE-2024-53168: sunrpc: fix one UAF issue caused by sunrpc kernel tcp socket

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.31% (percentile 16, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2024-12-27T13:49:14.165Z
- **Modified:** 2026-10-30T13:17:43.907Z

## Who should check

- Anyone running Linux \>= 26abe14379f8e2fa3fd1bcf97c9a7ad9364886fe, \< 7d44f706c6f1d89bcec901aa0da9067815803baf; \>= 26abe14379f8e2fa3fd1bcf97c9a7ad9364886fe, \< 0ca87e5063757132a044d35baba40a7d4bb25394; \>= 26abe14379f8e2fa3fd1bcf97c9a7ad9364886fe, \< 694ccb05b79ee5f5a9f14c2f80d2635d3bb8bdc3; \>= 26abe14379f8e2fa3fd1bcf97c9a7ad9364886fe, \< 61c0a5eac96836de5e3a5897eccdc63162a94936; \>= 26abe14379f8e2fa3fd1bcf97c9a7ad9364886fe, \< 3f23f96528e8fcf8619895c4c916c52653892ec1
- Anyone running Linux 4.2

## Description

In the Linux kernel, the following vulnerability has been resolved:

sunrpc: fix one UAF issue caused by sunrpc kernel tcp socket

BUG: KASAN: slab-use-after-free in tcp\_write\_timer\_handler+0x156/0x3e0
Read of size 1 at addr ffff888111f322cd by task swapper/0/0

CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 6.12.0-rc4-dirty \#7
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1
Call Trace:
 \<IRQ\>
 dump\_stack\_lvl+0x68/0xa0
 print\_address\_description.constprop.0+0x2c/0x3d0
 print\_report+0xb4/0x270
 kasan\_report+0xbd/0xf0
 tcp\_write\_timer\_handler+0x156/0x3e0
 tcp\_write\_timer+0x66/0x170
 call\_timer\_fn+0xfb/0x1d0
 \_\_run\_timers+0x3f8/0x480
 run\_timer\_softirq+0x9b/0x100
 handle\_softirqs+0x153/0x390
 \_\_irq\_exit\_rcu+0x103/0x120
 irq\_exit\_rcu+0xe/0x20
 sysvec\_apic\_timer\_interrupt+0x76/0x90
 \</IRQ\>
 \<TASK\>
 asm\_sysvec\_apic\_timer\_interrupt+0x1a/0x20
RIP: 0010:default\_idle+0xf/0x20
Code: 4c 01 c7 4c 29 c2 e9 72 ff ff ff 90 90 90 90 90 90 90 90 90 90 90 90
 90 90 90 90 f3 0f 1e fa 66 90 0f 00 2d 33 f8 25 00 fb f4 \<fa\> c3 cc cc cc
 cc 66 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90
RSP: 0018:ffffffffa2007e28 EFLAGS: 00000242
RAX: 00000000000f3b31 RBX: 1ffffffff4400fc7 RCX: ffffffffa09c3196
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff9f00590f
RBP: 0000000000000000 R08: 0000000000000001 R09: ffffed102360835d
R10: ffff88811b041aeb R11: 0000000000000001 R12: 0000000000000000
R13: ffffffffa202d7c0 R14: 0000000000000000 R15: 00000000000147d0
 default\_idle\_call+0x6b/0xa0
 cpuidle\_idle\_call+0x1af/0x1f0
 do\_idle+0xbc/0x130
 cpu\_startup\_entry+0x33/0x40
 rest\_init+0x11f/0x210
 start\_kernel+0x39a/0x420
 x86\_64\_start\_reservations+0x18/0x30
 x86\_64\_start\_kernel+0x97/0xa0
 common\_startup\_64+0x13e/0x141
 \</TASK\>

Allocated by task 595:
 kasan\_save\_stack+0x24/0x50
 kasan\_save\_track+0x14/0x30
 \_\_kasan\_slab\_alloc+0x87/0x90
 kmem\_cache\_alloc\_noprof+0x12b/0x3f0
 copy\_net\_ns+0x94/0x380
 create\_new\_namespaces+0x24c/0x500
 unshare\_nsproxy\_namespaces+0x75/0xf0
 ksys\_unshare+0x24e/0x4f0
 \_\_x64\_sys\_unshare+0x1f/0x30
 do\_syscall\_64+0x70/0x180
 entry\_SYSCALL\_64\_after\_hwframe+0x76/0x7e

Freed by task 100:
 kasan\_save\_stack+0x24/0x50
 kasan\_save\_track+0x14/0x30
 kasan\_save\_free\_info+0x3b/0x60
 \_\_kasan\_slab\_free+0x54/0x70
 kmem\_cache\_free+0x156/0x5d0
 cleanup\_net+0x5d3/0x670
 process\_one\_work+0x776/0xa90
 worker\_thread+0x2e2/0x560
 kthread+0x1a8/0x1f0
 ret\_from\_fork+0x34/0x60
 ret\_from\_fork\_asm+0x1a/0x30

Reproduction script:

mkdir -p /mnt/nfsshare
mkdir -p /mnt/nfs/netns\_1
mkfs.ext4 /dev/sdb
mount /dev/sdb /mnt/nfsshare
systemctl restart nfs-server
chmod 777 /mnt/nfsshare
exportfs -i -o rw,no\_root\_squash \*:/mnt/nfsshare

ip netns add netns\_1
ip link add name veth\_1\_peer type veth peer veth\_1
ifconfig veth\_1\_peer 11.11.0.254 up
ip link set veth\_1 netns netns\_1
ip netns exec netns\_1 ifconfig veth\_1 11.11.0.1

ip netns exec netns\_1 /root/iptables -A OUTPUT -d 11.11.0.254 -p tcp \\
	--tcp-flags FIN FIN  -j DROP

(note: In my environment, a DESTROY\_CLIENTID operation is always sent
 immediately, breaking the nfs tcp connection.)
ip netns exec netns\_1 timeout -s 9 300 mount -t nfs -o proto=tcp,vers=4.1 \\
	11.11.0.254:/mnt/nfsshare /mnt/nfs/netns\_1

ip netns del netns\_1

The reason here is that the tcp socket in netns\_1 (nfs side) has been
shutdown and closed (done in xs\_destroy), but the FIN message (with ack)
is discarded, and the nfsd side keeps sending retransmission messages.
As a result, when the tcp sock in netns\_1 processes the received message,
it sends the message (FIN message) in the sending queue, and the tcp timer
is re-established. When the network namespace is deleted, the net structure
accessed by tcp's timer handler function causes problems.

To fix this problem, let's hold netns refcnt for the tcp kernel socket as
done in other modules. This is an ugly hack which can easily be backported
to earlier kernels. A proper fix which cleans up the interfaces will
follow, but may not be so easy to backport.

## Affected and fixed versions

- Linux: \>= 26abe14379f8e2fa3fd1bcf97c9a7ad9364886fe, \< 7d44f706c6f1d89bcec901aa0da9067815803baf; \>= 26abe14379f8e2fa3fd1bcf97c9a7ad9364886fe, \< 0ca87e5063757132a044d35baba40a7d4bb25394; \>= 26abe14379f8e2fa3fd1bcf97c9a7ad9364886fe, \< 694ccb05b79ee5f5a9f14c2f80d2635d3bb8bdc3; \>= 26abe14379f8e2fa3fd1bcf97c9a7ad9364886fe, \< 61c0a5eac96836de5e3a5897eccdc63162a94936; \>= 26abe14379f8e2fa3fd1bcf97c9a7ad9364886fe, \< 3f23f96528e8fcf8619895c4c916c52653892ec1 (cvelist)
- Linux: 4.2 (cvelist)

## Mitigation

- Upgrade Linux to 3f23f96528e8fcf8619895c4c916c52653892ec1 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-53168. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-53168.md
Affected: Linux >= 26abe14379f8e2fa3fd1bcf97c9a7ad9364886fe, < 7d44f706c6f1d89bcec901aa0da9067815803baf; >= 26abe14379f8e2fa3fd1bcf97c9a7ad9364886fe, < 0ca87e5063757132a044d35baba40a7d4bb25394; >= 26abe14379f8e2fa3fd1bcf97c9a7ad9364886fe, < 694ccb05b79ee5f5a9f14c2f80d2635d3bb8bdc3; >= 26abe14379f8e2fa3fd1bcf…
Fixed in: Linux 7d44f706c6f1d89bcec901aa0da9067815803baf, Linux 0ca87e5063757132a044d35baba40a7d4bb25394, Linux 694ccb05b79ee5f5a9f14c2f80d2635d3bb8bdc3, Linux 61c0a5eac96836de5e3a5897eccdc63162a94936, Linux 3f23f96528e8fcf8619895c4c916c52653892ec1

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-53168 being exploited?

There is no confirmed exploitation: CVE-2024-53168 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.31% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-53168?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-53168?

Linux \>= 26abe14379f8e2fa3fd1bcf97c9a7ad9364886fe, \< 7d44f706c6f1d89bcec901aa0da9067815803baf; \>= 26abe14379f8e2fa3fd1bcf97c9a7ad9364886fe, \< 0ca87e5063757132a044d35baba40a7d4bb25394; \>= 26abe14379f8e2fa3fd1bcf97c9a7ad9364886fe, \< 694ccb05b79ee5f5a9f14c2f80d2635d3bb8bdc3; \>= 26abe14379f8e2fa3fd1bcf97c9a7ad9364886fe, \< 61c0a5eac96836de5e3a5897eccdc63162a94936; \>= 26abe14379f8e2fa3fd1bcf97c9a7ad9364886fe, \< 3f23f96528e8fcf8619895c4c916c52653892ec1; Linux 4.2.

### Is there a fix for CVE-2024-53168?

Yes. Fixed in Linux 7d44f706c6f1d89bcec901aa0da9067815803baf, Linux 0ca87e5063757132a044d35baba40a7d4bb25394, Linux 694ccb05b79ee5f5a9f14c2f80d2635d3bb8bdc3, Linux 61c0a5eac96836de5e3a5897eccdc63162a94936, Linux 3f23f96528e8fcf8619895c4c916c52653892ec1. Upgrade Linux to 3f23f96528e8fcf8619895c4c916c52653892ec1 or later.

### How do I check if I'm affected by CVE-2024-53168?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/0ca87e5063757132a044d35baba40a7d4bb25394>
- patch: <https://git.kernel.org/stable/c/694ccb05b79ee5f5a9f14c2f80d2635d3bb8bdc3>
- patch: <https://git.kernel.org/stable/c/61c0a5eac96836de5e3a5897eccdc63162a94936>
- patch: <https://git.kernel.org/stable/c/3f23f96528e8fcf8619895c4c916c52653892ec1>
- other: <https://git.kernel.org/stable/c/7d44f706c6f1d89bcec901aa0da9067815803baf>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-53168>

HTML: <https://flawdb.com/CVE-2024-53168> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-53168>
