[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #21134 [Core Tor/Tor]: Fail if file is too large to mmap.



#21134: Fail if file is too large to mmap.
--------------------------------------------+------------------------------
 Reporter:  junglefowl                      |          Owner:
     Type:  defect                          |         Status:
                                            |  needs_revision
 Priority:  Medium                          |      Milestone:  Tor:
                                            |  0.3.0.x-final
Component:  Core Tor/Tor                    |        Version:  Tor: 0.2.9.8
 Severity:  Normal                          |     Resolution:
 Keywords:  tor_mmap_file, review-group-15  |  Actual Points:
Parent ID:                                  |         Points:
 Reviewer:  nickm                           |        Sponsor:
--------------------------------------------+------------------------------

Comment (by junglefowl):

 I have modified the patch as requested:

  * added a changes file
  * st_size is checked to be non-negative before comparing with SIZE_MAX
  * increased log level to warn

 Keep in mind that an empty file is logged with info though. In fact I
 copied that block because it seemed to be the best matching error handling
 one.

 I did not adjust the code to accept SIZE_MAX. It will be impossible to
 load SIZE_MAX bytes into the address space, because even the used bytes in
 the stack make it impossible to succeed.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/21134#comment:12>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs