Skip to content

Commit d953370

Browse files
pvts-matPlaidCat
authored andcommitted
net: tls, update curr on splice as well
jira VULN-4133 cve CVE-2024-0646 commit-author John Fastabend <[email protected]> commit c5a5950 upstream-diff used linux-stable LT-5.15 sha ba5efd8 commit c5a5950 upstream. 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: Greg Kroah-Hartman <[email protected]> (cherry picked from commit ba5efd8) Signed-off-by: Marcin Wcisło <[email protected]>
1 parent 7a9482b commit d953370

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)