Skip to content

Commit 8ad16a7

Browse files
author
Sabrina Dubroca
committed
net: tls, update curr on splice as well
JIRA: https://issues.redhat.com/browse/RHEL-19066 CVE: CVE-2024-0646 Tested: selftests + reproducer Conflict: apply the changes to tls_sw_do_sendpage, missing the big splice rework (fe1e81d and 45e5be8) commit c5a5950 Author: John Fastabend <[email protected]> Date: Wed Dec 6 15:27:05 2023 -0800 net: tls, update curr on splice as well The curr pointer must also be updated on the splice similar to how we do this for other copy types. Fixes: d829e9c ("tls: convert to generic sk_msg interface") Signed-off-by: John Fastabend <[email protected]> Reported-by: Jann Horn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Sabrina Dubroca <[email protected]>
1 parent 8c9ebc0 commit 8ad16a7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

net/tls/tls_sw.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,6 +1213,8 @@ static int tls_sw_do_sendpage(struct sock *sk, struct page *page,
12131213
}
12141214

12151215
sk_msg_page_add(msg_pl, page, copy, offset);
1216+
msg_pl->sg.copybreak = 0;
1217+
msg_pl->sg.curr = msg_pl->sg.end;
12161218
sk_mem_charge(sk, copy);
12171219

12181220
offset += copy;

0 commit comments

Comments
 (0)