Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ticket30561 029 #1052

Merged
Merged

Conversation

Labels
None yet
Projects
None yet
4 participants
@nmathewson
Copy link
Contributor

@nmathewson nmathewson commented May 29, 2019

No description provided.

stoeckmann and others added 2 commits May 29, 2019
If tor is compiled on a system with neither vasprintf nor _vscprintf,
the fallback implementation exposes a logic flaw which prevents
proper usage of strings longer than 127 characters:

* tor_vsnprintf returns -1 if supplied buffer is not large enough,
  but tor_vasprintf uses this function to retrieve required length
* the result of tor_vsnprintf is not properly checked for negative
  return values

Both aspects together could in theory lead to exposure of uninitialized
stack memory in the resulting string. This requires an invalid format
string or data that exceeds integer limitations.

Fortunately tor is not even able to run with this implementation because
it runs into asserts early on during startup. Also the unit tests fail
during a "make check" run.

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>

  [backported to 0.2.9 by nickm]
@coveralls
Copy link

@coveralls coveralls commented May 29, 2019

Pull Request Test Coverage Report for Build 5131

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 3 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.02%) to 50.129%

Files with Coverage Reduction New Missed Lines %
src/ext/trunnel/trunnel.c 1 34.48%
src/or/rendcache.c 2 93.15%
Totals Coverage Status
Change from base Build 5058: 0.02%
Covered Lines: 29506
Relevant Lines: 58860

💛 - Coveralls

@torproject-pusher torproject-pusher merged commit 0e0cf4a into torproject:maint-0.2.9 Aug 9, 2019
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment