mirror-linux/net/vmw_vsock
Stefano Garzarella 4157501b9a vsock/virtio: fix skb overhead overflow on 32-bit builds
On 32-bit architectures, both skb_queue_len() and SKB_TRUESIZE(0) evaluate
to 32-bit values. The multiplication can overflow before being assigned to
the u64 skb_overhead variable, making the skb overhead check ineffective.

Cast skb_queue_len() to u64 so the multiplication is always performed in
64-bit arithmetic.

This issue was reported by Sashiko while reviewing another patch.

Fixes: 059b7dbd20 ("vsock/virtio: fix potential unbounded skb queue")
Closes: https://sashiko.dev/#/patchset/20260518090656.134588-1-sgarzare%40redhat.com
Cc: stable@vger.kernel.org
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Link: https://patch.msgid.link/20260521124732.125771-1-sgarzare@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-05-22 19:05:10 -07:00
..
Kconfig Drivers: hv: Add CONFIG_HYPERV_VMBUS option 2025-10-01 00:00:42 +00:00
Makefile vsock: support sockmap 2023-03-29 08:19:38 +01:00
af_vsock.c vsock: keep poll shutdown state consistent 2026-05-22 11:27:57 -07:00
af_vsock_tap.c
diag.c sock_diag: add module pointer to "struct sock_diag_handler" 2024-01-23 15:13:54 +01:00
hyperv_transport.c vsock: keep poll shutdown state consistent 2026-05-22 11:27:57 -07:00
virtio_transport.c vsock: add G2H fallback for CIDs not owned by H2G transport 2026-03-12 10:59:36 +01:00
virtio_transport_common.c vsock/virtio: fix skb overhead overflow on 32-bit builds 2026-05-22 19:05:10 -07:00
vmci_transport.c vsock: keep poll shutdown state consistent 2026-05-22 11:27:57 -07:00
vmci_transport.h vsock: Remove unused function declarations 2023-07-31 14:41:08 -07:00
vmci_transport_notify.c vmci/vsock: check SO_RCVLOWAT before wake up reader 2022-08-23 10:43:12 +02:00
vmci_transport_notify.h vsock: remove include/linux/vm_sockets.h file 2019-11-14 18:12:17 -08:00
vmci_transport_notify_qstate.c vmci/vsock: check SO_RCVLOWAT before wake up reader 2022-08-23 10:43:12 +02:00
vsock_addr.c net: Convert proto_ops connect() callbacks to use sockaddr_unsized 2025-11-04 19:10:32 -08:00
vsock_bpf.c net: remove addr_len argument of recvmsg() handlers 2026-03-02 18:17:17 -08:00
vsock_loopback.c vsock: add netns support to virtio transports 2026-01-27 10:45:38 +01:00