pico-sdk
pico-sdk copied to clipboard
stdio_usb somehow emits garbage memory to the terminal window via PuTTY/KiTTY
See https://github.com/JamesDunne/pico-stdio-usb-bug for a minimal(-ish) reproducible example with no external dependencies required.
Steps to reproduce:
- Use Pico board with USB connection to host PC
- Build example repo
- Flash firmware
- Connect PuTTY (or KiTTY) using serial mode to COM5 (or wherever your Pico is)
- Observe output until seeing dropped data and/or corrupted terminal output
Example output:
The output text above indicates some sort of memory overflow bug in KiTTY but their bug should not be triggered by such trivial ASCII-only printf()
calls from the Pico. The presence of text like RegDeleteValue
clearly indicates a Windows-side memory overflow since none of that text should exist in the Pico binaries.
Commenting out the only use of format-specifiers in printf() calls triggers the issue far less often but still triggers it.
their bug should not be triggered by such trivial ASCII-only printf() calls from the Pico
Why not? They have a bug, and a bad one. This probably could be exploited. This should be reported to Pu/KiTTY as an urgent issue, since it has safety implications.
If anything, this is an excellent repro test case. It's not Pico SDK's job to avoid safety-critical bugs in other software...
no evidence of this being anything other than a Pu/KiTTY bug