summaryrefslogtreecommitdiff
path: root/include/linux/stacktrace.h
diff options
context:
space:
mode:
authorLuigi Leonardi <leonardi@redhat.com>2026-04-15 18:09:28 +0300
committerJakub Kicinski <kuba@kernel.org>2026-04-17 05:34:22 +0300
commit080f22f5d30233faf3d83be3098f35b8be9b7a00 (patch)
tree8fbad3e8a1b856b50b84881e50b02ffdbf0ab479 /include/linux/stacktrace.h
parentd2dced26bc6a188534957e82a9a8e0a25ce81549 (diff)
downloadlinux-080f22f5d30233faf3d83be3098f35b8be9b7a00.tar.xz
vsock/virtio: fix MSG_PEEK ignoring skb offset when calculating bytes to copy
`virtio_transport_stream_do_peek()` does not account for the skb offset when computing the number of bytes to copy. This means that, after a partial recv() that advances the offset, a peek requesting more bytes than are available in the sk_buff causes `skb_copy_datagram_iter()` to go past the valid payload, resulting in a -EFAULT. The dequeue path already handles this correctly. Apply the same logic to the peek path. Fixes: 0df7cd3c13e4 ("vsock/virtio/vhost: read data from non-linear skb") Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Acked-by: Arseniy Krasnov <avkrasnov@salutedevices.com> Signed-off-by: Luigi Leonardi <leonardi@redhat.com> Link: https://patch.msgid.link/20260415-fix_peek-v4-1-8207e872759e@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/stacktrace.h')
0 files changed, 0 insertions, 0 deletions