Skip to content

{bp-19323} drivers/usbdev: rndis: Reject truncated responses#19342

Merged
xiaoxiang781216 merged 1 commit into
apache:releases/13.0from
jerpelea:bp-19323
Jul 6, 2026
Merged

{bp-19323} drivers/usbdev: rndis: Reject truncated responses#19342
xiaoxiang781216 merged 1 commit into
apache:releases/13.0from
jerpelea:bp-19323

Conversation

@jerpelea

@jerpelea jerpelea commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

When several RNDIS responses are queued, the control request handler sends one complete response if the host wLength is smaller than the whole queue. If the first queued response is also larger than wLength, copying hdr->msglen bytes would overrun the requested transfer and the completion path would consume a partial message.

Return EMSGSIZE before copying in that case so the queued response remains intact for a retry with a large enough wLength.

Impact

RELEASE

Testing

CI

When several RNDIS responses are queued, the control request handler sends one complete response if the host wLength is smaller than the whole queue. If the first queued response is also larger than wLength, copying hdr->msglen bytes would overrun the requested transfer and the completion path would consume a partial message.

Return EMSGSIZE before copying in that case so the queued response remains intact for a retry with a large enough wLength.

Signed-off-by: Old-Ding <35417409+Old-Ding@users.noreply.github.com>
@jerpelea jerpelea requested a review from xiaoxiang781216 as a code owner July 6, 2026 05:43
@github-actions github-actions Bot added Size: S The size of the change in this PR is small Area: USB labels Jul 6, 2026
@jerpelea

jerpelea commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

@cederom ping

@xiaoxiang781216 xiaoxiang781216 merged commit 6989e89 into apache:releases/13.0 Jul 6, 2026
41 checks passed
@jerpelea jerpelea deleted the bp-19323 branch July 6, 2026 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: USB Size: S The size of the change in this PR is small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants