Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2025-38089 PoC — sunrpc: handle SVC_GARBAGE during svc auth processing as auth error

Source
Associated Vulnerability
Title:sunrpc: handle SVC_GARBAGE during svc auth processing as auth error (CVE-2025-38089)
Description:In the Linux kernel, the following vulnerability has been resolved: sunrpc: handle SVC_GARBAGE during svc auth processing as auth error tianshuo han reported a remotely-triggerable crash if the client sends a kernel RPC server a specially crafted packet. If decoding the RPC reply fails in such a way that SVC_GARBAGE is returned without setting the rq_accept_statp pointer, then that pointer can be dereferenced and a value stored there. If it's the first time the thread has processed an RPC, then that pointer will be set to NULL and the kernel will crash. In other cases, it could create a memory scribble. The server sunrpc code treats a SVC_GARBAGE return from svc_authenticate or pg_authenticate as if it should send a GARBAGE_ARGS reply. RFC 5531 says that if authentication fails that the RPC should be rejected instead with a status of AUTH_ERR. Handle a SVC_GARBAGE return as an AUTH_ERROR, with a reason of AUTH_BADCRED instead of returning GARBAGE_ARGS in that case. This sidesteps the whole problem of touching the rpc_accept_statp pointer in this situation and avoids the crash.
Description
PoC for CVE-2025-38089
Readme
# Overview
Proof-of-Concept exploit for NFSundown (CVE-2025-38089). It can remotely trigger a kernel crash in an NFS server.

# Details
A remote attacker can trigger a kernel null pointer dereference and crash the kernel by sending a specially crafted RPC request. This occurs due to improper handling of the `rqstp->rq_accept_statp` pointer in the SUNRPC code path, allowing it to remain NULL and be dereferenced in error handling branches. In some circumstances(when all the server thread has accepted a connection for at least once), this could also result in a use-after-free. The vulnerability is now assigned CVE-2025-38089.

## Affected Version
- introduced in: 6.3, [29cd2927fb914cc53b5ba4f67d2b74695c994ba4](https://github.com/torvalds/linux/commit/29cd2927fb914cc53b5ba4f67d2b74695c994ba4)
- fixed in: 6.16, [94d10a4dba0bc482f2b01e39f06d5513d0f75742](https://github.com/torvalds/linux/commit/94d10a4dba0bc482f2b01e39f06d5513d0f75742)

## Usage
1. start the vulnerable NFS server, make sure the network connection to the victim is working
2. change the IPs and interface in `poc.py` as needed, then run the following command
```bash
iptables -A OUTPUT -p tcp --tcp-flags RST RST -j DROP # drop the RST packets from the victim server
python poc.py
```

# Acknowledgements
I would like to thank [@FFreestanding](https://github.com/FFreestanding) in helping reproducing the bug and developing the PoC.

# Disclaimer
This proof-of-concept (PoC) code is provided for educational and research purposes only.

Use this code responsibly and only on systems you own or have explicit permission to test.

The authors and contributors are not responsible for any misuse or damage caused by this code.
File Snapshot

[4.0K] /data/pocs/fb4b00943b68323a1db055119449d9fa19d5588b ├── [1.0K] LICENSE ├── [3.3K] poc.py └── [1.7K] README.md 0 directories, 3 files
Shenlong Bot has cached this for you
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →