# CVE-2025-38181: calipso: Fix null-ptr-deref in calipso\_req\_{set,del}attr().

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

- **Severity:** HIGH 7.5
- **CVSS:** 7.5 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; 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:** Remote, no login needed
- **EPSS:** 0.86% (percentile 56, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2025-07-04T13:37:08.985Z
- **Modified:** 2026-10-15T22:18:32.780Z

## Who should check

- Anyone running Linux \>= e1adea927080821ebfa7505bff752a4015955660, \< 956f1499412ed0953f6a116df7fdb855e9f1fc66; \>= e1adea927080821ebfa7505bff752a4015955660, \< f4ae0f61dd9a63329ecb49b1e6356139d43240b8; \>= e1adea927080821ebfa7505bff752a4015955660, \< dc724bd34d56f5589f7587a091a8cda2386826c4; \>= e1adea927080821ebfa7505bff752a4015955660, \< 058dd4a370f23a5553a9449f2db53d5bfa88d45e; \>= e1adea927080821ebfa7505bff752a4015955660, \< bde8833eb075ba8e8674de88e32de6b669966451; \>= e1adea927080821ebfa7505bff752a4015955660, \< 988edde4d52d5c02ea4dd95d7619372a5e2fb7b7; \>= e1adea927080821ebfa7505bff752a4015955660, \< d092c7fd8e220b23d6c47e03d7d0cc79e731f379; \>= e1adea927080821ebfa7505bff752a4015955660, \< 10876da918fa1aec0227fb4c67647513447f53a9
- Anyone running Linux 4.8

## Description

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

calipso: Fix null-ptr-deref in calipso\_req\_{set,del}attr().

syzkaller reported a null-ptr-deref in sock\_omalloc() while allocating
a CALIPSO option.  \[0\]

The NULL is of struct sock, which was fetched by sk\_to\_full\_sk() in
calipso\_req\_setattr().

Since commit a1a5344ddbe8 ("tcp: avoid two atomic ops for syncookies"),
reqsk-\>rsk\_listener could be NULL when SYN Cookie is returned to its
client, as hinted by the leading SYN Cookie log.

Here are 3 options to fix the bug:

  1) Return 0 in calipso\_req\_setattr()
  2) Return an error in calipso\_req\_setattr()
  3) Alaways set rsk\_listener

1) is no go as it bypasses LSM, but 2) effectively disables SYN Cookie
for CALIPSO.  3) is also no go as there have been many efforts to reduce
atomic ops and make TCP robust against DDoS.  See also commit 3b24d854cb35
("tcp/dccp: do not touch listener sk\_refcnt under synflood").

As of the blamed commit, SYN Cookie already did not need refcounting,
and no one has stumbled on the bug for 9 years, so no CALIPSO user will
care about SYN Cookie.

Let's return an error in calipso\_req\_setattr() and calipso\_req\_delattr()
in the SYN Cookie case.

This can be reproduced by \[1\] on Fedora and now connect() of nc times out.

\[0\]:
TCP: request\_sock\_TCPv6: Possible SYN flooding on port \[::\]:20002. Sending cookies.
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000006: 0000 \[\#1\] PREEMPT SMP KASAN NOPTI
KASAN: null-ptr-deref in range \[0x0000000000000030-0x0000000000000037\]
CPU: 3 UID: 0 PID: 12262 Comm: syz.1.2611 Not tainted 6.14.0 \#2
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014
RIP: 0010:read\_pnet include/net/net\_namespace.h:406 \[inline\]
RIP: 0010:sock\_net include/net/sock.h:655 \[inline\]
RIP: 0010:sock\_kmalloc+0x35/0x170 net/core/sock.c:2806
Code: 89 d5 41 54 55 89 f5 53 48 89 fb e8 25 e3 c6 fd e8 f0 91 e3 00 48 8d 7b 30 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 \<80\> 3c 02 00 0f 85 26 01 00 00 48 b8 00 00 00 00 00 fc ff df 4c 8b
RSP: 0018:ffff88811af89038 EFLAGS: 00010216
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffff888105266400
RDX: 0000000000000006 RSI: ffff88800c890000 RDI: 0000000000000030
RBP: 0000000000000050 R08: 0000000000000000 R09: ffff88810526640e
R10: ffffed1020a4cc81 R11: ffff88810526640f R12: 0000000000000000
R13: 0000000000000820 R14: ffff888105266400 R15: 0000000000000050
FS:  00007f0653a07640(0000) GS:ffff88811af80000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f863ba096f4 CR3: 00000000163c0005 CR4: 0000000000770ef0
PKRU: 80000000
Call Trace:
 \<IRQ\>
 ipv6\_renew\_options+0x279/0x950 net/ipv6/exthdrs.c:1288
 calipso\_req\_setattr+0x181/0x340 net/ipv6/calipso.c:1204
 calipso\_req\_setattr+0x56/0x80 net/netlabel/netlabel\_calipso.c:597
 netlbl\_req\_setattr+0x18a/0x440 net/netlabel/netlabel\_kapi.c:1249
 selinux\_netlbl\_inet\_conn\_request+0x1fb/0x320 security/selinux/netlabel.c:342
 selinux\_inet\_conn\_request+0x1eb/0x2c0 security/selinux/hooks.c:5551
 security\_inet\_conn\_request+0x50/0xa0 security/security.c:4945
 tcp\_v6\_route\_req+0x22c/0x550 net/ipv6/tcp\_ipv6.c:825
 tcp\_conn\_request+0xec8/0x2b70 net/ipv4/tcp\_input.c:7275
 tcp\_v6\_conn\_request+0x1e3/0x440 net/ipv6/tcp\_ipv6.c:1328
 tcp\_rcv\_state\_process+0xafa/0x52b0 net/ipv4/tcp\_input.c:6781
 tcp\_v6\_do\_rcv+0x8a6/0x1a40 net/ipv6/tcp\_ipv6.c:1667
 tcp\_v6\_rcv+0x505e/0x5b50 net/ipv6/tcp\_ipv6.c:1904
 ip6\_protocol\_deliver\_rcu+0x17c/0x1da0 net/ipv6/ip6\_input.c:436
 ip6\_input\_finish+0x103/0x180 net/ipv6/ip6\_input.c:480
 NF\_HOOK include/linux/netfilter.h:314 \[inline\]
 NF\_HOOK include/linux/netfilter.h:308 \[inline\]
 ip6\_input+0x13c/0x6b0 net/ipv6/ip6\_input.c:491
 dst\_input include/net/dst.h:469 \[inline\]
 ip6\_rcv\_finish net/ipv6/ip6\_input.c:79 \[inline\]
 ip6\_rcv\_finish+0xb6/0x490 net/ipv6/ip6\_input.c:69
 NF\_HOOK include/linux/netfilter.h:314 \[inline\]
 NF\_HOOK include/linux/netf
---truncated---

## Affected and fixed versions

- Linux: \>= e1adea927080821ebfa7505bff752a4015955660, \< 956f1499412ed0953f6a116df7fdb855e9f1fc66; \>= e1adea927080821ebfa7505bff752a4015955660, \< f4ae0f61dd9a63329ecb49b1e6356139d43240b8; \>= e1adea927080821ebfa7505bff752a4015955660, \< dc724bd34d56f5589f7587a091a8cda2386826c4; \>= e1adea927080821ebfa7505bff752a4015955660, \< 058dd4a370f23a5553a9449f2db53d5bfa88d45e; \>= e1adea927080821ebfa7505bff752a4015955660, \< bde8833eb075ba8e8674de88e32de6b669966451; \>= e1adea927080821ebfa7505bff752a4015955660, \< 988edde4d52d5c02ea4dd95d7619372a5e2fb7b7; \>= e1adea927080821ebfa7505bff752a4015955660, \< d092c7fd8e220b23d6c47e03d7d0cc79e731f379; \>= e1adea927080821ebfa7505bff752a4015955660, \< 10876da918fa1aec0227fb4c67647513447f53a9 (cvelist)
- Linux: 4.8 (cvelist)

## Mitigation

- Upgrade Linux to 10876da918fa1aec0227fb4c67647513447f53a9 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-38181. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-38181.md
Affected: Linux >= e1adea927080821ebfa7505bff752a4015955660, < 956f1499412ed0953f6a116df7fdb855e9f1fc66; >= e1adea927080821ebfa7505bff752a4015955660, < f4ae0f61dd9a63329ecb49b1e6356139d43240b8; >= e1adea927080821ebfa7505bff752a4015955660, < dc724bd34d56f5589f7587a091a8cda2386826c4; >= e1adea927080821ebfa7505…
Fixed in: Linux 956f1499412ed0953f6a116df7fdb855e9f1fc66, Linux 058dd4a370f23a5553a9449f2db53d5bfa88d45e, Linux 988edde4d52d5c02ea4dd95d7619372a5e2fb7b7, Linux 10876da918fa1aec0227fb4c67647513447f53a9

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-38181 being exploited?

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

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

High: CVSS 7.5 (v3.1, scored by CNA). Remote, no login needed.

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

Linux \>= e1adea927080821ebfa7505bff752a4015955660, \< 956f1499412ed0953f6a116df7fdb855e9f1fc66; \>= e1adea927080821ebfa7505bff752a4015955660, \< f4ae0f61dd9a63329ecb49b1e6356139d43240b8; \>= e1adea927080821ebfa7505bff752a4015955660, \< dc724bd34d56f5589f7587a091a8cda2386826c4; \>= e1adea927080821ebfa7505bff752a4015955660, \< 058dd4a370f23a5553a9449f2db53d5bfa88d45e; \>= e1adea927080821ebfa7505bff752a4015955660, \< bde8833eb075ba8e8674de88e32de6b669966451; \>= e1adea927080821ebfa7505bff752a4015955660, \< 988edde4d52d5c02ea4dd95d7619372a5e2fb7b7; \>= e1adea927080821ebfa7505bff752a4015955660, \< d092c7fd8e220b23d6c47e03d7d0cc79e731f379; \>= e1adea927080821ebfa7505bff752a4015955660, \< 10876da918fa1aec0227fb4c67647513447f53a9; Linux 4.8.

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

Yes. Fixed in Linux 956f1499412ed0953f6a116df7fdb855e9f1fc66, Linux 058dd4a370f23a5553a9449f2db53d5bfa88d45e, Linux 988edde4d52d5c02ea4dd95d7619372a5e2fb7b7, Linux 10876da918fa1aec0227fb4c67647513447f53a9. Upgrade Linux to 10876da918fa1aec0227fb4c67647513447f53a9 or later.

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

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/956f1499412ed0953f6a116df7fdb855e9f1fc66>
- patch: <https://git.kernel.org/stable/c/f4ae0f61dd9a63329ecb49b1e6356139d43240b8>
- patch: <https://git.kernel.org/stable/c/dc724bd34d56f5589f7587a091a8cda2386826c4>
- patch: <https://git.kernel.org/stable/c/058dd4a370f23a5553a9449f2db53d5bfa88d45e>
- patch: <https://git.kernel.org/stable/c/bde8833eb075ba8e8674de88e32de6b669966451>
- patch: <https://git.kernel.org/stable/c/988edde4d52d5c02ea4dd95d7619372a5e2fb7b7>
- patch: <https://git.kernel.org/stable/c/d092c7fd8e220b23d6c47e03d7d0cc79e731f379>
- patch: <https://git.kernel.org/stable/c/10876da918fa1aec0227fb4c67647513447f53a9>
- other: <https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html>
- other: <https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html>

## 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-38181>

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