Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Tor Tor
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 319
    • Issues 319
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 37
    • Merge requests 37
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • Core
  • TorTor
  • Issues
  • #2326
Closed
Open
Created Dec 29, 2010 by Roger Dingledine@armaReporter

carefully crafted cache file sizes can trigger assert

In read_file_to_str() we do

  if ((uint64_t)(statbuf.st_size)+1 > SIZE_T_CEILING)
    return NULL;

  string = tor_malloc((size_t)(statbuf.st_size+1));

So a remote attacker who can give you a combination of cached blobs such that one of your files becomes exactly SIZE_T_CEILING bytes (just 2 gigs on a 32 bit platform) could cause your Tor to consistently assert on start.

The fix is to check >= instead of >.

Reported by doors.

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