Opened 3 years ago

Closed 2 years ago

Last modified 2 years ago

#24029 closed defect (not a bug)

Test all rust functions' behavior when called from C with bad UTF8

Reported by: nickm Owned by: chelseakomlo
Priority: Medium Milestone: Tor: 0.3.3.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: rust, 033-triage-20180320, 033-removed-20180320
Cc: chelseakomlo, isis Actual Points:
Parent ID: #24265 Points:
Reviewer: Sponsor:


We should make sure that the various rust implementations of our protover functions will correctly detect and reject strings that aren't UTF-8

Child Tickets

Change History (8)

comment:1 Changed 3 years ago by chelseakomlo

Owner: set to chelseakomlo
Status: newassigned

comment:2 Changed 2 years ago by teor

Parent ID: #24265

comment:3 Changed 2 years ago by isis

Cc: isis added

comment:4 Changed 2 years ago by nickm

Keywords: 033-triage-20180320 added

Marking all tickets reached by current round of 033 triage.

comment:5 Changed 2 years ago by nickm

Keywords: 033-removed-20180320 added

Mark all not-already-included tickets as pending review for removal from 0.3.3 milestone.

comment:6 Changed 2 years ago by isis

Hmmm, none of the functions are taking &[u8]s, so invalid UTF-8 string will be rejected when the C pointers are read from and converted into Strings. Unless I misunderstood and you wanted something else, we can probably close this?

comment:7 Changed 2 years ago by nickm

Resolution: not a bug
Status: assignedclosed

No, I think we can close this ticket if that's how it works. Thanks for the analysis!

comment:8 Changed 2 years ago by teor

If C doesn't reject bad UTF-8, and Rust does, then that's a potential difference in behaviour.

We could avoid this issue by making both C and Rust check that all directory documents are ASCII (#18938), or that they are all UTF-8. We have a proposal for making directory documents UTF-8.

Note: See TracTickets for help on using tickets.