Skip to content

std: fix Xous UDP recv length over-report and OOB panic#159523

Open
devnexen wants to merge 1 commit into
rust-lang:mainfrom
devnexen:xous_upd_fix_2
Open

std: fix Xous UDP recv length over-report and OOB panic#159523
devnexen wants to merge 1 commit into
rust-lang:mainfrom
devnexen:xous_upd_fix_2

Conversation

@devnexen

@devnexen devnexen commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

recv_inner returned the datagram length instead of the bytes copied into the caller's buffer, and rxlen >= 4075 could index past the receive buffer and panic. Clamp the count to both buffers, as in #158928.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jul 18, 2026
@rustbot

rustbot commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

r? @Darksonn

rustbot has assigned @Darksonn.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ChrisDenton, libs
  • @ChrisDenton, libs expanded to 13 candidates
  • Random selection from 6 candidates

@rustbot

This comment has been minimized.

@workingjubilee workingjubilee added the O-xous OS: A microkernel OS for privacy in computing label Jul 19, 2026
@workingjubilee

Copy link
Copy Markdown
Member

Can you address the thing that rustbot mentioned?

recv_inner returned the datagram length instead of the bytes copied into
the caller's buffer, and rxlen >= 4075 could index past the receive
buffer and panic. Clamp the count to both buffers, mirroring the earlier
send_to fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-xous OS: A microkernel OS for privacy in computing S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants