# CVE-2025-40012: net/smc: fix warning in smc\_rx\_splice() when calling get\_page()

> 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.23% (percentile 8, 2026-11-26)
- **Published:** 2025-10-20T15:26:57.214Z
- **Modified:** 2026-10-19T21:10:00.160Z

## Who should check

- Anyone running Linux \>= f7a22071dbf316c982fb44308874bd7ad9ac2091, \< 14fc4fdae42e34d7ee871b292ac2ecc61c2c5de7; \>= f7a22071dbf316c982fb44308874bd7ad9ac2091, \< d5411685dc2f6ac7bdf01a0a204d56cae38c6cf6; \>= f7a22071dbf316c982fb44308874bd7ad9ac2091, \< a35c04de2565db191726b5741e6b66a35002c652
- Anyone running Linux 6.10

## Description

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

net/smc: fix warning in smc\_rx\_splice() when calling get\_page()

smc\_lo\_register\_dmb() allocates DMB buffers with kzalloc(), which are
later passed to get\_page() in smc\_rx\_splice(). Since kmalloc memory is
not page-backed, this triggers WARN\_ON\_ONCE() in get\_page() and prevents
holding a refcount on the buffer. This can lead to use-after-free if
the memory is released before splice\_to\_pipe() completes.

Use folio\_alloc() instead, ensuring DMBs are page-backed and safe for
get\_page().

WARNING: CPU: 18 PID: 12152 at ./include/linux/mm.h:1330 smc\_rx\_splice+0xaf8/0xe20 \[smc\]
CPU: 18 UID: 0 PID: 12152 Comm: smcapp Kdump: loaded Not tainted 6.17.0-rc3-11705-g9cf4672ecfee \#10 NONE
Hardware name: IBM 3931 A01 704 (z/VM 7.4.0)
Krnl PSW : 0704e00180000000 000793161032696c (smc\_rx\_splice+0xafc/0xe20 \[smc\])
           R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:2 PM:0 RI:0 EA:3
Krnl GPRS: 0000000000000000 001cee80007d3001 00077400000000f8 0000000000000005
           0000000000000001 001cee80007d3006 0007740000001000 001c000000000000
           000000009b0c99e0 0000000000001000 001c0000000000f8 001c000000000000
           000003ffcc6f7c88 0007740003e98000 0007931600000005 000792969b2ff7b8
Krnl Code: 0007931610326960: af000000		mc	0,0
           0007931610326964: a7f4ff43		brc	15,00079316103267ea
          \#0007931610326968: af000000		mc	0,0
          \>000793161032696c: a7f4ff3f		brc	15,00079316103267ea
           0007931610326970: e320f1000004	lg	%r2,256(%r15)
           0007931610326976: c0e53fd1b5f5	brasl	%r14,000793168fd5d560
           000793161032697c: a7f4fbb5		brc	15,00079316103260e6
           0007931610326980: b904002b		lgr	%r2,%r11
Call Trace:
 smc\_rx\_splice+0xafc/0xe20 \[smc\]
 smc\_rx\_splice+0x756/0xe20 \[smc\])
 smc\_rx\_recvmsg+0xa74/0xe00 \[smc\]
 smc\_splice\_read+0x1ce/0x3b0 \[smc\]
 sock\_splice\_read+0xa2/0xf0
 do\_splice\_read+0x198/0x240
 splice\_file\_to\_pipe+0x7e/0x110
 do\_splice+0x59e/0xde0
 \_\_do\_splice+0x11a/0x2d0
 \_\_s390x\_sys\_splice+0x140/0x1f0
 \_\_do\_syscall+0x122/0x280
 system\_call+0x6e/0x90
Last Breaking-Event-Address:
smc\_rx\_splice+0x960/0xe20 \[smc\]
---\[ end trace 0000000000000000 \]---

## Affected and fixed versions

- Linux: \>= f7a22071dbf316c982fb44308874bd7ad9ac2091, \< 14fc4fdae42e34d7ee871b292ac2ecc61c2c5de7; \>= f7a22071dbf316c982fb44308874bd7ad9ac2091, \< d5411685dc2f6ac7bdf01a0a204d56cae38c6cf6; \>= f7a22071dbf316c982fb44308874bd7ad9ac2091, \< a35c04de2565db191726b5741e6b66a35002c652 (cvelist)
- Linux: 6.10 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2025-40012.md
Affected: Linux >= f7a22071dbf316c982fb44308874bd7ad9ac2091, < 14fc4fdae42e34d7ee871b292ac2ecc61c2c5de7; >= f7a22071dbf316c982fb44308874bd7ad9ac2091, < d5411685dc2f6ac7bdf01a0a204d56cae38c6cf6; >= f7a22071dbf316c982fb44308874bd7ad9ac2091, < a35c04de2565db191726b5741e6b66a35002c652; Linux 6.10
Fixed in: Linux 14fc4fdae42e34d7ee871b292ac2ecc61c2c5de7

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

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

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

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

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

Linux \>= f7a22071dbf316c982fb44308874bd7ad9ac2091, \< 14fc4fdae42e34d7ee871b292ac2ecc61c2c5de7; \>= f7a22071dbf316c982fb44308874bd7ad9ac2091, \< d5411685dc2f6ac7bdf01a0a204d56cae38c6cf6; \>= f7a22071dbf316c982fb44308874bd7ad9ac2091, \< a35c04de2565db191726b5741e6b66a35002c652; Linux 6.10.

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

Yes. Fixed in Linux 14fc4fdae42e34d7ee871b292ac2ecc61c2c5de7. No fix listed yet: follow the vendor advisory.

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

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/14fc4fdae42e34d7ee871b292ac2ecc61c2c5de7>
- other: <https://git.kernel.org/stable/c/d5411685dc2f6ac7bdf01a0a204d56cae38c6cf6>
- other: <https://git.kernel.org/stable/c/a35c04de2565db191726b5741e6b66a35002c652>

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

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