# CVE-2026-98595: udp: remove a disconnected socket from the 4-tuple hash table

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

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.21% (percentile 6, 2026-11-26)
- **Published:** 2026-10-18T15:19:07.840Z
- **Modified:** 2026-10-19T10:19:20.767Z

## Who should check

- Anyone running Linux \>= 78c91ae2c6deb5d236a5a93ff2995cdd05514380, \< c21daf37d5ce9a4e234b7c42238ac1e6041e28e4; \>= 78c91ae2c6deb5d236a5a93ff2995cdd05514380, \< d1b5fd969cc53f29d02b82b05a45135de4a6087a; \>= 78c91ae2c6deb5d236a5a93ff2995cdd05514380, \< 9e95b1a94c9c49b4ba722251bbca2759b9c51737
- Anyone running Linux 6.13

## Description

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

udp: remove a disconnected socket from the 4-tuple hash table

A UDP socket bound to a specific address and port keeps its entry in the
4-tuple hash table after it is disconnected:

    sk binds to 127.0.0.1:21001
    sk connects to 127.0.0.2:20001	// filed in the 4-tuple table
    sk disconnects, connect(AF\_UNSPEC)	// still filed, peer now 0.0.0.0:0

\_\_udp\_disconnect() takes a socket out of that table only as a side effect
of -\>rehash() or -\>unhash(), and it skips -\>rehash() when
SOCK\_BINDADDR\_LOCK is set and -\>unhash() when SOCK\_BINDPORT\_LOCK is set.
commit 6996a2d2d0a6 ("udp: Unhash auto-bound connected sk from 4-tuple hash
table when disconnected.") fixed the same end state for a wildcard-bound
socket, by a path this one does not take.

The entry is counted whether or not anything hits it. hash4\_cnt on the
hash2 slot stays raised for as long as the socket lives, so udp\_has\_hash4()
keeps sending every packet for that address and port through the 4-tuple
lookup first.

On IPv6 it can also be hit. \_\_udp\_disconnect() does not clear sk\_v6\_daddr,
so udp\_v6\_rehash() files the entry under the peer the socket was connected
to with a zero dport, and inet6\_match() compares that same
field: a datagram from the former peer with a zero source port matches,
and source port zero is accepted on receive. On IPv4 the peer is cleared,
so a match would need a zero source address as well, which the routing
layer rejects as martian. The stale sk\_v6\_daddr is a separate defect, not
addressed here; removing the entry closes this path either way.

The entry can also be relocated. \_\_udp\_disconnect() clears sk\_bound\_dev\_if,
so a subsequent SO\_BINDTODEVICE calls -\>rehash(), and because the receive
address is still specific udp\_lib\_rehash() moves the entry instead of
removing it, into the bucket that (rcv\_saddr, num, 0, 0) hashes to -- a
pure function of the address and port, so every socket reaching this state
on one address and port collects in one bucket. The bucket cannot be chosen
from outside, as udp\_ehashfn() is seeded with a per-boot secret. This last
one became reachable only with commit 644f9108f3a5 ("udp: Make rehash4
independent in udp\_lib\_rehash()"), which moved the hash4 handling out of a
branch a disconnected socket does not take; the stale entry itself dates
from the commit in Fixes.

Take the socket out of the table before \_\_udp\_disconnect() runs, while it
still matches how it was filed. This also reaches the wildcard case ahead
of udp\_lib\_rehash()'s udp\_unhash4() branch, leaving that branch unreachable
from udp\_disconnect(); removing it belongs in net-next. udp\_disconnect()
and udp\_abort() are the only UDP entries into \_\_udp\_disconnect(), which is
shared with raw, ping and l2tp sockets that are not struct udp\_sock:
ping\_prot.obj\_size is sizeof(struct inet\_sock), so udp\_hashed4() on one
would read past the allocation.

## Affected and fixed versions

- Linux: \>= 78c91ae2c6deb5d236a5a93ff2995cdd05514380, \< c21daf37d5ce9a4e234b7c42238ac1e6041e28e4; \>= 78c91ae2c6deb5d236a5a93ff2995cdd05514380, \< d1b5fd969cc53f29d02b82b05a45135de4a6087a; \>= 78c91ae2c6deb5d236a5a93ff2995cdd05514380, \< 9e95b1a94c9c49b4ba722251bbca2759b9c51737 (cvelist)
- Linux: 6.13 (cvelist)

## Mitigation

- Upgrade Linux to 9e95b1a94c9c49b4ba722251bbca2759b9c51737 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2026-98595.md
Affected: Linux >= 78c91ae2c6deb5d236a5a93ff2995cdd05514380, < c21daf37d5ce9a4e234b7c42238ac1e6041e28e4; >= 78c91ae2c6deb5d236a5a93ff2995cdd05514380, < d1b5fd969cc53f29d02b82b05a45135de4a6087a; >= 78c91ae2c6deb5d236a5a93ff2995cdd05514380, < 9e95b1a94c9c49b4ba722251bbca2759b9c51737; Linux 6.13
Fixed in: Linux 9e95b1a94c9c49b4ba722251bbca2759b9c51737

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-2026-98595 being exploited?

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

### How serious is CVE-2026-98595?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2026-98595?

Linux \>= 78c91ae2c6deb5d236a5a93ff2995cdd05514380, \< c21daf37d5ce9a4e234b7c42238ac1e6041e28e4; \>= 78c91ae2c6deb5d236a5a93ff2995cdd05514380, \< d1b5fd969cc53f29d02b82b05a45135de4a6087a; \>= 78c91ae2c6deb5d236a5a93ff2995cdd05514380, \< 9e95b1a94c9c49b4ba722251bbca2759b9c51737; Linux 6.13.

### Is there a fix for CVE-2026-98595?

Yes. Fixed in Linux 9e95b1a94c9c49b4ba722251bbca2759b9c51737. Upgrade Linux to 9e95b1a94c9c49b4ba722251bbca2759b9c51737 or later.

### How do I check if I'm affected by CVE-2026-98595?

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

- other: <https://git.kernel.org/stable/c/c21daf37d5ce9a4e234b7c42238ac1e6041e28e4>
- other: <https://git.kernel.org/stable/c/d1b5fd969cc53f29d02b82b05a45135de4a6087a>
- other: <https://git.kernel.org/stable/c/9e95b1a94c9c49b4ba722251bbca2759b9c51737>

## 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-2026-98595>

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