From: Cheng Yongkang <teel4res@gmail.com>
To: Shuah Khan <skhan@linuxfoundation.org>,
Sung Byeongchan <tjdqudcks0424@naver.com>
Cc: Cheng Yongkang <teel4res@gmail.com>,
Valentina Manea <valentina.manea.m@gmail.com>,
Shuah Khan <shuah@kernel.org>, Hongren Zheng <i@zenithal.me>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] usbip: clear actual_length after a failed receive
Date: Sun, 1 Nov 2026 00:18:25 -0700 [thread overview]
Message-ID: <20261101071825.1856826-1-teel4res@gmail.com> (raw)
In-Reply-To: <179333358668.2111112.12827497703998022783@gmail.com>
Hi Shuah, Sung,
My patch 1/2 makes the same change as Sung's earlier submission:
https://lore.kernel.org/linux-usb/20261009122636.642575-1-tjdqudcks0424@naver.com/
Please drop mine; sorry for the duplicate. My explanation above of why
-EPROTO alone does not stop the usbfs copy applies to Sung's patch as
well.
That change does not cover the high-bit length case raised in the
review of Sung's patch:
https://lore.kernel.org/linux-usb/sashiko-outbox-165560@kernel.org/
I have only checked this in the source: usbip_recv_xbuff() stores the
length in an int, so a value with the top bit set takes the size <= 0
early return, and the URB is given back with that length.
I have sent the usbfs side separately. It bounds actual_length in
usbfs regardless of what the HCD reports:
https://lore.kernel.org/linux-usb/20261101070651.1846947-1-teel4res@gmail.com/
Thanks,
Cheng Yongkang
next prev parent reply other threads:[~2026-11-01 7:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-29 14:12 [PATCH 0/2] usb: fix over-reported actual_length in usbip/usbfs Cheng Yongkang
2026-10-29 14:12 ` [PATCH 1/2] usbip: clear actual_length after a failed receive Cheng Yongkang
2026-10-29 14:32 ` sashiko-bot
2026-10-29 18:42 ` Shuah Khan
2026-10-30 4:13 ` Cheng Yongkang
2026-11-01 7:18 ` Cheng Yongkang [this message]
2026-11-10 18:57 ` Shuah Khan
2026-11-10 21:29 ` Alan Stern
2026-11-11 15:56 ` Shuah Khan
2026-10-29 14:12 ` [PATCH 2/2] usb: usbfs: clamp the copied length to transfer_buffer_length Cheng Yongkang
2026-10-29 14:46 ` sashiko-bot
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=20261101071825.1856826-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.