Skip to content
Commit 067e6ec9 authored by Nikolay Kuratov's avatar Nikolay Kuratov Committed by Greg Kroah-Hartman
Browse files

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



[ Upstream commit 60316d7f ]

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>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent cc7cf0b2
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