From: Cheng Yongkang <teel4res@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Valentina Manea <valentina.manea.m@gmail.com>,
Shuah Khan <shuah@kernel.org>,
Shuah Khan <skhan@linuxfoundation.org>,
Hongren Zheng <i@zenithal.me>,
Sung Byeongchan <tjdqudcks0424@naver.com>
Subject: Re: [PATCH v2] usb: usbfs: clamp actual_length to transfer_buffer_length
Date: Sun, 1 Nov 2026 01:09:46 -0800 [thread overview]
Message-ID: <20261101090946.1963739-1-teel4res@gmail.com> (raw)
In-Reply-To: <2026110138-kettle-daredevil-ceb5@gregkh>
Hi Greg,
Agreed, that is where the bug is, so please drop this patch.
That was in fact the first fix: patch 1/2 of my original series cleared
actual_length in vhci when usbip_recv_xbuff() fails:
https://lore.kernel.org/linux-usb/179328314074.648427.388274461758949120@gmail.com/
I withdrew it only because Sung Byeongchan had posted the same one-liner
three weeks earlier:
https://lore.kernel.org/linux-usb/20261009122636.642575-1-tjdqudcks0424@naver.com/
That patch has been waiting since, with an open question from Shuah.
Its review had also already pointed out the case it misses: a returned
length with the top bit set is read into an int in usbip_recv_xbuff(),
takes the size <= 0 early return, and the URB is given back with that
length anyway:
https://lore.kernel.org/linux-usb/sashiko-outbox-165560@kernel.org/
Rejecting any actual_length larger than transfer_buffer_length in
vhci_recv_ret_submit() covers both. I can send that, or Sung can fold
it into his patch, whichever you and Shuah prefer.
Thanks,
Cheng Yongkang
prev parent reply other threads:[~2026-11-01 9:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-01 7:06 Cheng Yongkang
2026-11-01 8:52 ` Greg Kroah-Hartman
2026-11-01 9:09 ` Cheng Yongkang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261101090946.1963739-1-teel4res@gmail.com \
--to=teel4res@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=i@zenithal.me \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=shuah@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=tjdqudcks0424@naver.com \
--cc=valentina.manea.m@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®