# CVE-2025-38475: smc: Fix various oops due to inet\_sock type confusion.

> 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.28% (percentile 13, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2025-07-28T11:21:36.293Z
- **Modified:** 2026-08-05T12:02:12.245Z

## Who should check

- Anyone running Linux \>= d25a92ccae6bed02327b63d138e12e7806830f78, \< 5b02e397929e5b13b969ef1f8e43c7951e2864f5; \>= d25a92ccae6bed02327b63d138e12e7806830f78, \< 67a167a6b8b45607bc34aa541d1c75097d18d460; \>= d25a92ccae6bed02327b63d138e12e7806830f78, \< 60ada4fe644edaa6c2da97364184b0425e8aeaf5
- Anyone running Linux 6.11

## Description

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

smc: Fix various oops due to inet\_sock type confusion.

syzbot reported weird splats \[0\]\[1\] in cipso\_v4\_sock\_setattr() while
freeing inet\_sk(sk)-\>inet\_opt.

The address was freed multiple times even though it was read-only memory.

cipso\_v4\_sock\_setattr() did nothing wrong, and the root cause was type
confusion.

The cited commit made it possible to create smc\_sock as an INET socket.

The issue is that struct smc\_sock does not have struct inet\_sock as the
first member but hijacks AF\_INET and AF\_INET6 sk\_family, which confuses
various places.

In this case, inet\_sock.inet\_opt was actually smc\_sock.clcsk\_data\_ready(),
which is an address of a function in the text segment.

  $ pahole -C inet\_sock vmlinux
  struct inet\_sock {
  ...
          struct ip\_options\_rcu \*    inet\_opt;             /\*   784     8 \*/

  $ pahole -C smc\_sock vmlinux
  struct smc\_sock {
  ...
          void                       (\*clcsk\_data\_ready)(struct sock \*); /\*   784     8 \*/

The same issue for another field was reported before. \[2\]\[3\]

At that time, an ugly hack was suggested \[4\], but it makes both INET
and SMC code error-prone and hard to change.

Also, yet another variant was fixed by a hacky commit 98d4435efcbf3
("net/smc: prevent NULL pointer dereference in txopt\_get").

Instead of papering over the root cause by such hacks, we should not
allow non-INET socket to reuse the INET infra.

Let's add inet\_sock as the first member of smc\_sock.

\[0\]:
kvfree\_call\_rcu(): Double-freed call. rcu\_head 000000006921da73
WARNING: CPU: 0 PID: 6718 at mm/slab\_common.c:1956 kvfree\_call\_rcu+0x94/0x3f0 mm/slab\_common.c:1955
Modules linked in:
CPU: 0 UID: 0 PID: 6718 Comm: syz.0.17 Tainted: G        W           6.16.0-rc4-syzkaller-g7482bb149b9f \#0 PREEMPT
Tainted: \[W\]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : kvfree\_call\_rcu+0x94/0x3f0 mm/slab\_common.c:1955
lr : kvfree\_call\_rcu+0x94/0x3f0 mm/slab\_common.c:1955
sp : ffff8000a03a7730
x29: ffff8000a03a7730 x28: 00000000fffffff5 x27: 1fffe000184823d3
x26: dfff800000000000 x25: ffff0000c2411e9e x24: ffff0000dd88da00
x23: ffff8000891ac9a0 x22: 00000000ffffffea x21: ffff8000891ac9a0
x20: ffff8000891ac9a0 x19: ffff80008afc2480 x18: 00000000ffffffff
x17: 0000000000000000 x16: ffff80008ae642c8 x15: ffff700011ede14c
x14: 1ffff00011ede14c x13: 0000000000000004 x12: ffffffffffffffff
x11: ffff700011ede14c x10: 0000000000ff0100 x9 : 5fa3c1ffaf0ff000
x8 : 5fa3c1ffaf0ff000 x7 : 0000000000000001 x6 : 0000000000000001
x5 : ffff8000a03a7078 x4 : ffff80008f766c20 x3 : ffff80008054d360
x2 : 0000000000000000 x1 : 0000000000000201 x0 : 0000000000000000
Call trace:
 kvfree\_call\_rcu+0x94/0x3f0 mm/slab\_common.c:1955 (P)
 cipso\_v4\_sock\_setattr+0x2f0/0x3f4 net/ipv4/cipso\_ipv4.c:1914
 netlbl\_sock\_setattr+0x240/0x334 net/netlabel/netlabel\_kapi.c:1000
 smack\_netlbl\_add+0xa8/0x158 security/smack/smack\_lsm.c:2581
 smack\_inode\_setsecurity+0x378/0x430 security/smack/smack\_lsm.c:2912
 security\_inode\_setsecurity+0x118/0x3c0 security/security.c:2706
 \_\_vfs\_setxattr\_noperm+0x174/0x5c4 fs/xattr.c:251
 \_\_vfs\_setxattr\_locked+0x1ec/0x218 fs/xattr.c:295
 vfs\_setxattr+0x158/0x2ac fs/xattr.c:321
 do\_setxattr fs/xattr.c:636 \[inline\]
 file\_setxattr+0x1b8/0x294 fs/xattr.c:646
 path\_setxattrat+0x2ac/0x320 fs/xattr.c:711
 \_\_do\_sys\_fsetxattr fs/xattr.c:761 \[inline\]
 \_\_se\_sys\_fsetxattr fs/xattr.c:758 \[inline\]
 \_\_arm64\_sys\_fsetxattr+0xc0/0xdc fs/xattr.c:758
 \_\_invoke\_syscall arch/arm64/kernel/syscall.c:35 \[inline\]
 invoke\_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49
 el0\_svc\_common+0x130/0x23c arch/arm64/kernel/syscall.c:132
 do\_el0\_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151
 el0\_svc+0x58/0x180 arch/arm64/kernel/entry-common.c:879
 el0t\_64\_sync\_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:898
 el0t\_64\_sync+0x198/0x19c arch/arm64/kernel/entry.S:600

\[
---truncated---

## Affected and fixed versions

- Linux: \>= d25a92ccae6bed02327b63d138e12e7806830f78, \< 5b02e397929e5b13b969ef1f8e43c7951e2864f5; \>= d25a92ccae6bed02327b63d138e12e7806830f78, \< 67a167a6b8b45607bc34aa541d1c75097d18d460; \>= d25a92ccae6bed02327b63d138e12e7806830f78, \< 60ada4fe644edaa6c2da97364184b0425e8aeaf5 (cvelist)
- Linux: 6.11 (cvelist)

## Mitigation

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

Details: https://flawdb.com/CVE-2025-38475.md
Affected: Linux >= d25a92ccae6bed02327b63d138e12e7806830f78, < 5b02e397929e5b13b969ef1f8e43c7951e2864f5; >= d25a92ccae6bed02327b63d138e12e7806830f78, < 67a167a6b8b45607bc34aa541d1c75097d18d460; >= d25a92ccae6bed02327b63d138e12e7806830f78, < 60ada4fe644edaa6c2da97364184b0425e8aeaf5; Linux 6.11
Fixed in: Linux 5b02e397929e5b13b969ef1f8e43c7951e2864f5, Linux 67a167a6b8b45607bc34aa541d1c75097d18d460, Linux 60ada4fe644edaa6c2da97364184b0425e8aeaf5

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

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

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

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

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

Linux \>= d25a92ccae6bed02327b63d138e12e7806830f78, \< 5b02e397929e5b13b969ef1f8e43c7951e2864f5; \>= d25a92ccae6bed02327b63d138e12e7806830f78, \< 67a167a6b8b45607bc34aa541d1c75097d18d460; \>= d25a92ccae6bed02327b63d138e12e7806830f78, \< 60ada4fe644edaa6c2da97364184b0425e8aeaf5; Linux 6.11.

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

Yes. Fixed in Linux 5b02e397929e5b13b969ef1f8e43c7951e2864f5, Linux 67a167a6b8b45607bc34aa541d1c75097d18d460, Linux 60ada4fe644edaa6c2da97364184b0425e8aeaf5. Upgrade Linux to 60ada4fe644edaa6c2da97364184b0425e8aeaf5 or later.

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

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/5b02e397929e5b13b969ef1f8e43c7951e2864f5>
- patch: <https://git.kernel.org/stable/c/67a167a6b8b45607bc34aa541d1c75097d18d460>
- patch: <https://git.kernel.org/stable/c/60ada4fe644edaa6c2da97364184b0425e8aeaf5>

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

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