test_audio_host: out-of-bounds read in test_audio_host_uses_exponential_full_speed_iso_interval
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
Research direction
The ASan report points to test/unit-test/test/host/audio/test_audio_host.c:2018 in test_audio_host_uses_exponential_full_speed_iso_interval. Read the first loop and inspect how edpt_xfer_count is initialized and updated; guard the index or start after the first transfer. Run the audio host tests under ASan and confirm the overflow is gone.
Written by the indexing model from the issue text.
Description
Under AddressSanitizer, test_audio_host_uses_exponential_full_speed_iso_interval reports a global-buffer-overflow at test/unit-test/test/host/audio/test_audio_host.c:2018: the first loop reads edpt_xfer_bytes[edpt_xfer_count - 1] while edpt_xfer_count is still 0. The test passes in the normal (non-ASan) build.
The test was added by 485d8a245 ("implement explicit feeback support"). Found while ASan-checking the #4165 co-fix; deferred as pre-existing and unrelated to that PR.
Remaining work: guard the index (or start the loop after the first transfer), then run the audio host tests under ASan.
- Dominant language
- C
- Stars
- 7.2k
- Forks
- 1.6k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 96
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from hathach/tinyusb
-
followup Prio 📌
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
followup Prio 📌
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 1 day
-
followup Prio 📌
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
followup Prio 📌
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
followup Prio 📌
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
espressif/esp-vision#16 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
libsdl-org/SDL#16577 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
halt_error adds a trailing newline for non-string input, contrary to the manualPossibly taken @Huang-404-Q claimed this today. Open
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
MerginMaps/geodiff#272 ·