audit 0.21.0: MSC and MTP follow-ups
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 12/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Attiva
- Stack tecnologico
- c
- Ambito
- embedded-iot
Direzione di ricerca
Read mtp_device.c around lines 185, 468 and 585 to trace how an armed OUT receive survives a Cancel, then mtp_device.c:332,680 with mtp_device.h:88 for the Data-IN early-response path. For item 3, start at msc_device.c:408 and src/device/usbd.c:1640, checking whether usbd_open_edpt_pair() validates descriptor length bounds before the MPS pre-read. Done means a diagnosed contract (toggle-preserving partial-OUT drain, IN cancellation, descriptor size checks) confirmed by raw host or HIL runs, since only source tracing has happened so far.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Deferred defects found in the repository audit of 0.21.0..ad7c83db8 (batch class-msc-mtp). Each was validated against the source at ad7c83db8 and judged real but too large, or too hardware-dependent, for the audit PR's contained fixes.
1. Cancel changes to COMMAND while a partially filled OUT receive remains armed. Its next completion can contain old data followed by the next command.
- Where:
mtp_device.c:185,468,585 - Verdict: valid causal path; stated timing not reproduced; introduced: New COMMAND transition/live-read reuse; baseline Cancel was also incomplete; severity: medium
- Hardware/spec dependence: M host-cancel sequence checked; DCD partial-receive/abort behavior lacks variant records
- Overlap: #3961 covers IN, not this OUT case; #4495/#4107 early rejection are different triggers. No full coverage
- Remaining work and verification: Needs a toggle-preserving partial-OUT retirement/drain design, not an unconditional fallback abort. Existing raw test cancels after a complete 512-byte write, missing the partial-buffer trigger.
2. Early response from an unfinished Data-IN callback is transmitted as the next data packet, without cancellation handling.
- Where:
mtp_device.c:332,680;mtp_device.h:88 - Verdict: valid; introduced: Mechanism older; permissive API documentation new; severity: medium
- Hardware/spec dependence: M pp.31,36 checked: phase termination and device cancellation
- Overlap: #4040 and PR #4517 address Data-OUT only; partial overlap, not full coverage
- Remaining work and verification: Extend the early-answer contract deliberately to unfinished IN, preventing response submission before cancellation/phase completion. Test a GetObject callback that answers after the first full chunk; raw host/HIL validation required.
3. New MPS pre-read follows application descriptor lengths without bounds/type validation.
- Where:
msc_device.c:408;src/device/usbd.c:1640 - Verdict: valid malformed-descriptor hardening; claimed valid-config regression not established; introduced: New pre-read; unsafe descriptor-walk foundation older; severity: low
- Hardware/spec dependence: Bounds defect is source-level; descriptor legality needs USB lookup
- Overlap: #4387 related field-read scope; PR #4517 fixes the common helper only and does not protect this pre-read
- Remaining work and verification: Extend device descriptor hardening with minimum-size and remaining-span checks before either endpoint is inspected/opened.
bLength != 7alone is not proof of invalidity;usbd_open_edpt_pair()itself does not validate length bounds.
Adjudication notes: class-msc-mtp
Claims still needing read-doc:
- S08-06/C08-01, F2: For each affected DCD, does abort retire DMA/FIFO ownership and partial OUT state without changing the current toggle, and can a completion remain queued afterward? The nRF52840
DTOGGLEregister and applicable errata cited by the earlier reviewer need an actual claim record; its citations alone are not one. - S08-01/S08-07: Which abort/reset/clear-halt operations preserve an armed receive, and what ISR ordering guarantees make a core generation scheme safe? No all-variant equivalence was established.
- S08-04/S08-05/S08-15, only if revived: DMA/cache ownership for eliminating writes; permitted bulk MPS values for mask substitution; and per-HCD transfer-length/packet-boundary requirements for moving chunking.
- F10: USB descriptor minimum sizes, extended-length handling, and class endpoint ordering requirements before defining the accepted descriptor set.
Unverified: no unit suite, build, fuzz execution, or hardware run occurred. F5 arithmetic was executed; other defect triggers were traced in source. No additional independently established runtime defect beyond N08-01 was found in the inspected changes. The checkout remains clean, and no files were changed.
- Lingua principale
- C
- Stelle
- 7.3k
- Fork
- 1.6k
- Merge medio
- 1g 19h
- PR unite (30g)
- 67
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di hathach/tinyusb
-
follow-up Port WCH USBFS Prio 📌
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
I maintainer di solito rispondono entro 1 giorno
-
follow-up Prio 📌
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
hil-contract: a background hil_remote.py launch is killed at the Bash default 10 min timeoutForse già presa @hathach l’ha presa 16 giorni fa. Apertafollow-up Prio 📌
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
ch32v30x: debug UART loses queued bytes when its TX ring fillsForse già presa @hathach l’ha presa 16 giorni fa. Apertafollow-up Prio 📌
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
followup Prio 📌
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di hathach/tinyusb
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
rofl0r/proxychains-ng#631 ·
-
RP2350: enabling secure boot via rescue fails with 6400 (BOOTKEY written as 33 bytes in ECC mode)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
pcqpcq/open-source-android-apps#619 ·
I maintainer di solito rispondono entro 1 giorno
-
Can't link with minizip-ngAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 69/100
-
Missing slice offset check in jvp_equal fast path corrupts slice comparison and aborts delpathsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 3 giorni