diff options
| author | Bryam Vargas <hexlabsecurity@proton.me> | 2026-10-13 15:45:01 -0500 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-10-20 17:15:58 -0700 |
| commit | c0703534b223a5c6993e0f000fd1c3abe621fb65 (patch) | |
| tree | e7acaaf686971bebde4fd468a7b1f79cff2f7b77 /scripts/Makefile.thinlto | |
| parent | 9043be310c6a4c5e57f7bba4b9870554eac7aa96 (diff) | |
| download | linux-c0703534b223a5c6993e0f000fd1c3abe621fb65.tar.gz linux-c0703534b223a5c6993e0f000fd1c3abe621fb65.zip | |
net/smc: queue the copied chunk when smc_tx_sendmsg() faults
When a send wraps the end of the send buffer, smc_tx_sendmsg() copies
the data in two chunks. If memcpy_from_msg() faults on the second one,
smc_tx_sendmsg() returns send_done, which already counts the first
chunk, but leaves tx_curs_prep and sndbuf_space as they were. send()
reports bytes the peer never receives, and the next send() overwrites
them. Any caller can hit this on its own stream with a buffer whose
tail is unreadable.
On a fault in the second chunk, queue the first one. The next pass
retries the rest and returns send_done if it faults again, so send()
reports only what it queued, as TCP does.
Fixes: e6727f39004b ("smc: send data (through RDMA)")
Cc: stable@vger.kernel.org
Signed-off-by: Bryam Vargas <hexlabsecurity@proton.me>
Link: https://patch.msgid.link/20261013-b4-disp-872a3689-v1-1-2a4c63b04761@proton.me
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
