Opened 3 months ago

Closed 2 months ago

#23106 closed defect (fixed)

Audit code for swapped ntoh*/hton* calls

Reported by: nickm Owned by: nickm
Priority: Low Milestone: Tor: 0.3.2.x-final
Component: Core Tor/Tor Version:
Severity: Minor Keywords: review-group-22
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description (last modified by nickm)

I grepped for this, and found one in extended_cell_parseextend_cell_format(). (It's a ntohs that should be a htons.)

This is not a high-urgency item, since we don't support platforms where ntoh* and hton* behave differently.

Child Tickets

Change History (8)

comment:1 Changed 3 months ago by nickm

I think that the hs crew already spotted this one:

src/or/hs_descriptor.c:  set_uint64(dst + offset, tor_ntohll(desc->plaintext_data.revision_counter));

And that seems to be all. (Methodology: I grepped for get/set_uint[^8], and read all of the lines that didn't have the appropriate hton/ntoh incant.)

comment:2 Changed 3 months ago by nickm

Description: modified (diff)

comment:3 Changed 3 months ago by nickm

Status: newneeds_review

bug23106_032 has a fix here.

comment:4 Changed 2 months ago by nickm

Owner: set to nickm
Status: needs_reviewassigned

setting owner

comment:5 Changed 2 months ago by nickm

Status: assignedneeds_review

comment:6 Changed 2 months ago by nickm

Keywords: review-group-22 added

comment:7 Changed 2 months ago by dgoulet

Status: needs_reviewmerge_ready

ack.

comment:8 Changed 2 months ago by nickm

Resolution: fixed
Status: merge_readyclosed

Merged!

Note: See TracTickets for help on using tickets.