Re: [PATCH] vsock: reject negative tv_usec in SO_VM_SOCKETS_CONNECT_TIMEOUT
From: Paolo Abeni
Date: Tue Nov 03 2026 - 11:13:40 EST
On 10/30/26 13:09, Stefano Garzarella wrote:
On Fri, Oct 30, 2026 at 02:43:50PM +0800, phind.uet@xxxxxxxxx wrote:> maintainers apply this patch, so please wait their comments before sending a v2.
From: Nguyen Dinh Phi <phind.uet@xxxxxxxxx>
The timeval validation checks tv_usec < USEC_PER_SEC but not
tv_usec >= 0, so a negative tv_usec makes the timeout computation
wrap into a bogus value, later tripping "schedule_timeout: wrong
timeout value" instead of being rejected.
Fixes: d021c344051a ("VSOCK: Introduce VM Sockets")
This blank line shouldn't be there, maybe it can be fixed when the net
No need to repost: I fixed it while applying the patch.
/P