Opened 2 months ago

Closed 2 months ago

Last modified 2 months ago

#27649 closed defect (fixed)

rust protover double-counts protocol versions

Reported by: cyberpunks Owned by:
Priority: High Milestone: Tor: 0.3.5.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: rust, protover, 034-backport, 033-backport
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Or triple-, or N-counts. "Bar=1,1,1,1,1,1,1" gets parsed as 7 votes.

It fails the unit test from #27205.

Child Tickets

Change History (9)

comment:1 Changed 2 months ago by cyberpunks

Bug dates to the rewrite that introduced ProtoSet in 0.3.3.5-rc.

Attempt at fixing this in branch rust-protoverlap1 at https://gitgud.io/onionk/tor.git

Writing that, it also seems like leaving version zero as a reserved value is useful for protover implementations like this, since 0 is the initial value of last_high as a placeholder for 'no version seen yet.'

Last edited 2 months ago by cyberpunks (previous) (diff)

comment:2 Changed 2 months ago by nickm

Keywords: 034-backport added
Milestone: Tor: 0.3.5.x-final
Priority: MediumHigh

comment:3 Changed 2 months ago by nickm

Status: newneeds_review

comment:4 Changed 2 months ago by nickm

Made a PR as https://github.com/torproject/tor/pull/320 so this can get CI attention.

comment:5 in reply to:  2 ; Changed 2 months ago by cyberpunks

Pushed fix to the changes file.

Does this need 033-backport?

Would it qualify as "Major bugfixes (rust)"?

Last edited 2 months ago by cyberpunks (previous) (diff)

comment:6 in reply to:  5 Changed 2 months ago by catalyst

Replying to cyberpunks:

Pushed fix to the changes file.

Updated the pull request so CI can run on the updated changes file.

comment:7 Changed 2 months ago by nickm

Tests pass, changes seem okay. Merging.

comment:8 Changed 2 months ago by nickm

Resolution: fixed
Status: needs_reviewclosed

comment:9 Changed 2 months ago by nickm

Keywords: 033-backport added

(merged to 0.3.3 and forward, that is)

Note: See TracTickets for help on using tickets.