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

Don't pass a NULL into a %s when logging client auth file load failure #1013

Merged
merged 1 commit into from May 15, 2019

Conversation

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

@nmathewson nmathewson commented May 10, 2019

Fortunately, in 0.3.5.1-alpha we improved logging for various
failure cases involved with onion service client auth.

Unfortunately, for this one, we freed the file right before logging
its name.

Fortunately, tor_free() sets its pointer to NULL, so we didn't have
a use-after-free bug.

Unfortunately, passing NULL to %s is not defined.

Fortunately, GCC 9.1.1 caught the issue!

Unfortunately, nobody has actually tried building Tor with GCC 9.1.1
before. Or if they had, they didn't report the warning.

Fixes bug 30475; bugfix on 0.3.5.1-alpha.

Fortunately, in 0.3.5.1-alpha we improved logging for various
failure cases involved with onion service client auth.

Unfortunately, for this one, we freed the file right before logging
its name.

Fortunately, tor_free() sets its pointer to NULL, so we didn't have
a use-after-free bug.

Unfortunately, passing NULL to %s is not defined.

Fortunately, GCC 9.1.1 caught the issue!

Unfortunately, nobody has actually tried building Tor with GCC 9.1.1
before. Or if they had, they didn't report the warning.

Fixes bug 30475; bugfix on 0.3.5.1-alpha.
@coveralls
Copy link

@coveralls coveralls commented May 10, 2019

Pull Request Test Coverage Report for Build 4986

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • 19 unchanged lines in 4 files lost coverage.
  • Overall coverage decreased (-0.02%) to 62.415%

Files with Coverage Reduction New Missed Lines %
src/core/or/circuitpadding.c 3 92.07%
src/feature/dirauth/shared_random.c 3 85.64%
src/feature/hs/hs_service.c 4 73.63%
src/feature/dirauth/dirvote.c 9 64.74%
Totals Coverage Status
Change from base Build 4985: -0.02%
Covered Lines: 46502
Relevant Lines: 74505

💛 - Coveralls

@torproject-pusher torproject-pusher merged commit ff55840 into torproject:master May 15, 2019
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment