USB: configuration descriptors past 128 bytes are cut without a word #171

Open
opened 2026-11-11 21:32:29 +00:00 by rajames · 0 comments
Owner

Found

kernel/include/starkernel/xhci_driver.h:116 config_descriptor[128]; xhci_ep0_get_config_descriptor clamps the request to it. A composite device whose BOT or boot-keyboard interface starts past byte 128 is never found, and nothing says the descriptor was cut. QEMU's devices are small, so acceptance cannot show it; real sticks with UAS alternate settings and combo keyboards can be larger (the SER5 bring-up, boards/BRINGUP.md).

Done when

  • The buffer sized for real devices (wTotalLength up to its spec maximum, or a documented cap), or a cut descriptor logged
  • Checked on the SER5 with a composite device

🤖 Filed with Claude Code -- the code review of 2026-11-11, at 4d42d25c (Captain Bob, 2026-11-11: "File the review findings as issues"). Read, not run: each is to be confirmed by a test written first and seen to fail.

### Found `kernel/include/starkernel/xhci_driver.h:116` `config_descriptor[128]`; `xhci_ep0_get_config_descriptor` clamps the request to it. A composite device whose BOT or boot-keyboard interface starts past byte 128 is never found, and nothing says the descriptor was cut. QEMU's devices are small, so acceptance cannot show it; real sticks with UAS alternate settings and combo keyboards can be larger (the SER5 bring-up, `boards/BRINGUP.md`). ### Done when - [ ] The buffer sized for real devices (wTotalLength up to its spec maximum, or a documented cap), or a cut descriptor logged - [ ] Checked on the SER5 with a composite device 🤖 Filed with [Claude Code](https://claude.com/claude-code) -- the code review of 2026-11-11, at `4d42d25c` (Captain Bob, 2026-11-11: "File the review findings as issues"). Read, not run: each is to be confirmed by a test written first and seen to fail.
rajames added the area/kernel
kind
bug
priority
should
status
backlog
labels 2026-11-11 21:32:32 +00:00
Sign in to join this conversation.