CVE-2025-40012: net/smc: fix warning in smc_rx_splice() when calling get_page()
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 ]---
Security readout for executives and security teams
Plain-English summary
A flaw in the Linux kernel’s SMC networking code can leave received data referencing freed memory. A local, low-privileged user able to exercise the affected splice path could potentially crash the system or compromise confidentiality and integrity. The supplied CVSS score is 7.8 (high).
Executive priority
Treat as a high-priority kernel update for systems using SMC or permitting untrusted local users. It is less urgent where SMC is unavailable and local access is tightly controlled. There is no supplied evidence of active exploitation, but the potential impact spans system confidentiality, integrity, and availability.
Technical view
smc_lo_register_dmb() allocated DMB buffers with kzalloc(), but smc_rx_splice() passed them to get_page(). Because this memory was not page-backed, reference counting failed, creating a possible use-after-free before splice_to_pipe() completed. The published fix uses folio_alloc() so the buffers are page-backed.
Likely exposure
Exposure requires an affected Linux kernel and access to the SMC receive-and-splice path. The bundle lists Linux 6.10, 6.12.50, 6.16.10, and 6.17 as affected, but its version data is incomplete or ambiguous. Confirm distribution-specific applicability and SMC usage.
Exploitation context
The CVSS vector describes local access, low privileges, low complexity, no user interaction, and potential high confidentiality, integrity, and availability impact. The bundle marks this CVE as absent from KEV and provides no evidence of active exploitation or a public exploit.
Researcher notes
The root issue is an invalid lifetime assumption: kmalloc-backed DMB memory cannot safely receive a page reference through get_page(). The fix changes allocation to folio_alloc(). The bundle supplies three stable commits but does not map each commit to an exact release range, so downstream backport verification is necessary.
Mitigation direction
Install a vendor-supported kernel containing the referenced upstream or stable fixes.
Consult the Linux distribution’s advisory to map fixed package versions accurately.
Prioritize systems where SMC is enabled, available, or actively used.
If immediate updating is impossible, seek vendor-approved guidance for limiting SMC exposure.
Validation and detection
Record the running kernel and distribution package versions on potentially exposed systems.
Compare package versions against distribution advisories and the referenced stable commits.
Determine whether SMC support is configured, loaded, and used by local workloads.
After updating, verify the running kernel includes the applicable fix.
Monitor kernel logs for warnings referencing smc_rx_splice or get_page.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2025-40012 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
0ADP providers
4Source links
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.