Skip to content

Commit 9c20d49

Browse files
committed
net: tls, update curr on splice as well
jira VULN-8917 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: Brett Mastbergen <[email protected]>
1 parent 47d6528 commit 9c20d49

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
@@ -1203,6 +1203,8 @@ static int tls_sw_do_sendpage(struct sock *sk, struct page *page,
12031203
}
12041204

12051205
sk_msg_page_add(msg_pl, page, copy, offset);
1206+
msg_pl->sg.copybreak = 0;
1207+
msg_pl->sg.curr = msg_pl->sg.end;
12061208
sk_mem_charge(sk, copy);
12071209

12081210
offset += copy;

0 commit comments

Comments
 (0)