* [PATCH net] vsock: avoid narrowing the receive queue length to int
@ 2026-12-04 16:35 Ryosuke Iwahashi
2026-12-04 16:37 ` netdev-bot+sinfo
0 siblings, 1 reply; 3+ messages in thread
From: Ryosuke Iwahashi @ 2026-12-04 16:35 UTC (permalink / raw)
To: sgarzare
Cc: bobbyeshleman, davem, edumazet, kuba, pabeni, willemb, horms,
virtualization, netdev, arseny.krasnov
For virtio stream sockets, vsock_connectible_has_data() returns the
number of queued bytes as an s64. If the receive queue grows beyond
INT_MAX, vsock_connectible_wait_data() can narrow that count to a
negative int. Its callers then report an error even though data is
available.
Both callers only test whether the return value is positive. Return
one when data is available, preserving the zero and error cases.
Fixes: b3f7fd54881b ("af_vsock: separate wait data loop")
Signed-off-by: Ryosuke Iwahashi <ryosuke@ikotaslabs.com>
---
net/vmw_vsock/af_vsock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/vmw_vsock/af_vsock.c b/net/vmw_vsock/af_vsock.c
index 1d7d53542724..3bfc0bf9bd1d 100644
--- a/net/vmw_vsock/af_vsock.c
+++ b/net/vmw_vsock/af_vsock.c
@@ -2468,7 +2468,7 @@ static int vsock_connectible_wait_data(struct sock *sk,
if (data < 0)
return -ENOMEM;
- return data;
+ return data > 0;
}
static int __vsock_stream_recvmsg(struct sock *sk, struct msghdr *msg,
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] vsock: avoid narrowing the receive queue length to int
2026-12-04 16:35 [PATCH net] vsock: avoid narrowing the receive queue length to int Ryosuke Iwahashi
@ 2026-12-04 16:37 ` netdev-bot+sinfo
2026-12-04 16:39 ` Ryosuke Iwahashi
0 siblings, 1 reply; 3+ messages in thread
From: netdev-bot+sinfo @ 2026-12-04 16:37 UTC (permalink / raw)
To: Ryosuke Iwahashi
Cc: sgarzare, bobbyeshleman, davem, edumazet, kuba, pabeni, willemb,
horms, virtualization, netdev, arseny.krasnov
Hi!
This is an automated message. This series looks like a fix, but its
commit messages seem to be missing some information:
- How the issue was discovered, e.g. hit in production, hit during
development, syzbot report, manual code inspection, LLM or static
analysis tool scan.
- Whether the issue was actually triggered, or is only theoretical
(e.g. found by LLM and not proven at runtime). If it was triggered
please include the symptoms, like the stack trace or kernel messages.
Please do not repost the series just to address the above. Instead,
reply to this email with the missing information, so that reviewers
can take it into account.
*IMPORTANT*: If you do repost (for other reasons) - please include
the relevant info in the cover letter or commit messages.
--
The evaluation is done by an LLM so it may be wrong, if you think
that is the case please reply and explain.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] vsock: avoid narrowing the receive queue length to int
2026-12-04 16:37 ` netdev-bot+sinfo
@ 2026-12-04 16:39 ` Ryosuke Iwahashi
0 siblings, 0 replies; 3+ messages in thread
From: Ryosuke Iwahashi @ 2026-12-04 16:39 UTC (permalink / raw)
To: netdev-bot+sinfo
Cc: sgarzare, bobbyeshleman, davem, edumazet, kuba, pabeni, willemb,
horms, virtualization, netdev, arseny.krasnov
I found this during an LLM-assisted review of the VSOCK code for
kernelCTF. With 2,147,549,184 bytes queued, a one-byte MSG_PEEK
returned -2147418112 on the unpatched hardened-v1-7.2-rc5 build and 1
with the patch applied.
On Fri, 04 Dec 2026 16:37:22 +0000, netdev-bot+sinfo@kernel.org wrote:
> Hi!
>
> This is an automated message. This series looks like a fix, but its
> commit messages seem to be missing some information:
>
> - How the issue was discovered, e.g. hit in production, hit during
> development, syzbot report, manual code inspection, LLM or static
> analysis tool scan.
>
> - Whether the issue was actually triggered, or is only theoretical
> (e.g. found by LLM and not proven at runtime). If it was triggered
> please include the symptoms, like the stack trace or kernel messages.
>
> Please do not repost the series just to address the above. Instead,
> reply to this email with the missing information, so that reviewers
> can take it into account.
>
> *IMPORTANT*: If you do repost (for other reasons) - please include
> the relevant info in the cover letter or commit messages.
> --
> The evaluation is done by an LLM so it may be wrong, if you think
> that is the case please reply and explain.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-12-04 16:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04 16:35 [PATCH net] vsock: avoid narrowing the receive queue length to int Ryosuke Iwahashi
2026-12-04 16:37 ` netdev-bot+sinfo
2026-12-04 16:39 ` Ryosuke Iwahashi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox