protover.c accepts trailing spaces and extra spaces between subprotocol entries like "Link=1-4 LinkAuth=1 ", but rejects leading spaces like " Link=1-4". It has since its introduction.
The Rust implementation rejects all extra spaces in any position. It's at least consistent.
Trac: Username: cyberpunks
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
The protospaces2 branch at https://gitgud.io/onionk/tor.git changes the C implementation to reject them. Nothing actually produces extra spaces like this, right?
The protospaces2 branch at https://gitgud.io/onionk/tor.git changes the C implementation to reject them. Nothing actually produces extra spaces like this, right?
We could also update the protover spec to allow any number of spaces and tabs (WS), rather than a single space (SP), and update the C and Rust implementations to match.
Also, I'm not sure how you're finding all these protover bugs, but you might be interested in protover fuzzing in #24265 (moved). Someone already tried in #26265 (moved), but they didn't do it using Tor's existing fuzzing infrastructure, and we needed to be able to fuzz the rust and C functions in the same process.
We could also update the protover spec to allow any number of spaces and tabs (WS), rather than a single space (SP), and update the C and Rust implementations to match.
Marking a number of 0.3.5 tickets as possible, maybe even a good idea, for later. Possibly backportable, some of them. But not currently things to do as part of 0.3.5 stabilization.