Skip to content

Commit d800a7b

Browse files
committed
tls: rx: device: don't try to copy too much on detach
Another device offload bug, we use the length of the output skb as an indication of how much data to copy. But that skb is sized to offset + record length, and we start from offset. So we end up double-counting the offset which leads to skb_copy_bits() returning -EFAULT. Reported-by: Tariq Toukan <[email protected]> Fixes: 84c61fe ("tls: rx: do not use the standard strparser") Tested-by: Ran Rozenstein <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 86b259f commit d800a7b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/tls/tls_strp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ static struct sk_buff *tls_strp_msg_make_copy(struct tls_strparser *strp)
4141
struct sk_buff *skb;
4242
int i, err, offset;
4343

44-
skb = alloc_skb_with_frags(0, strp->anchor->len, TLS_PAGE_ORDER,
44+
skb = alloc_skb_with_frags(0, strp->stm.full_len, TLS_PAGE_ORDER,
4545
&err, strp->sk->sk_allocation);
4646
if (!skb)
4747
return NULL;

0 commit comments

Comments
 (0)