net: smc: fix splice entry lifetime imbalance in smc_rx_splice
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 9014db202cb764b8e14c53e7bacc81f9a1a2ba7f · < 0b7d54cedea5cb158e21925ae0c6c2f5c87ed2a0| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net: smc: fix splice entry lifetime imbalance in smc_rx_splice
smc_rx_splice() passes pages to splice_to_pipe() before taking the references that cover the lifetime of each splice entry. In the VM-backed RMB path, splice_to_pipe() may drop unqueued entries through smc_rx_spd_release(), while queued entries are released later via the pipe buffer callback.
The old post-splice accounting also derives the number of queued VM pages from an offset mutated while building the descriptor, and a multi-page splice pairs one sock_hold() with multiple sock_put() calls.
Take the page and socket references for every candidate entry before splice_to_pipe(), and drop the matching private state, page reference, and socket reference from smc_rx_spd_release() for entries that never get queued. This fixes a refcount imbalance that can underflow page refcounts and trigger a use-after-free.
From the CVE record · Linux
The Linux kernel's smc_rx_splice() has a reference-counting imbalance when handling splice entries. In the VM-backed RMB path, unqueued entries and multi-page splices can underflow page reference counts and trigger a use-after-free. The input does not specify whether exploitation requires local access, authentication, or user interaction.
Engineers running the Linux kernel should check their versions; affected versions are not specified in the input.