Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Trac
Trac
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Issue Boards

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • Legacy
  • TracTrac
  • Issues
  • #31682

Closed (moved)
Open
Opened Sep 10, 2019 by teor@teor

CID 1453653: Integer handling (NEGATIVE_RETURNS) in build_establish_intro_dos_extension()

trn_cell_extension_dos_encoded_len() returns ssize_t, but trn_cell_extension_field_setlen_field() takes size_t. This looks like a bug on #30924 (moved), copying sponsor fields across.

/src/feature/hs/hs_cell.c: 532 in build_establish_intro_dos_extension()
528       /* Set the field with the encoded DoS extension. */
529       dos_ext_encoded_len = trn_cell_extension_dos_encoded_len(dos_ext);
530       /* Set length field and the field array size length. */
531       trn_cell_extension_field_set_field_len(field, dos_ext_encoded_len);
   CID 1453653:  Integer handling issues  (NEGATIVE_RETURNS)
   "dos_ext_encoded_len" is passed to a parameter that cannot be negative.
532       trn_cell_extension_field_setlen_field(field, dos_ext_encoded_len);
533       /* Encode the DoS extension into the cell extension field. */
534       field_array = trn_cell_extension_field_getarray_field(field);
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Tor: 0.4.2.x-final
Milestone
Tor: 0.4.2.x-final
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#31682