Skip to content
Commit 60316d7f authored by Nikolay Kuratov's avatar Nikolay Kuratov Committed by Jakub Kicinski
Browse files

vsock/virtio: Fix unsigned integer wrap around in virtio_transport_has_space()

We need to do signed arithmetic if we expect condition
`if (bytes < 0)` to be possible

Found by Linux Verification Center (linuxtesting.org) with SVACE

Fixes: 06a8fc78

 ("VSOCK: Introduce virtio_vsock_common.ko")
Signed-off-by: default avatarNikolay Kuratov <kniv@yandex-team.ru>
Reviewed-by: default avatarStefano Garzarella <sgarzare@redhat.com>
Link: https://lore.kernel.org/r/20231211162317.4116625-1-kniv@yandex-team.ru
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 97028173
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment