Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #26522

Closed (moved)
(moved)
Open
Created Jun 27, 2018 by Trac@tracbot

strncat() without bounds

Hi Team,

https://github.com/torproject/tor/blob/master/src/lib/err/backtrace.c#L267-L268

i.e

strncat(version, " ", sizeof(version)-1); strncat(version, tor_version, sizeof(version)-1);

Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) such as (CWE-120).

Consider strcat_s, strlcat, snprintf, or automatically resizing strings. I feel the risk is high because the length parameter appears to be a constant, instead of computing the number of characters left.

Request team to please have a look and validate.

Regards Dhiraj

Trac:
Username: Dhiraj

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking