TS-4978: illegal memory access with ticket_key.filename#1120
Merged
SolidWallOfCode merged 1 commit intoapache:masterfrom Nov 1, 2016
Merged
TS-4978: illegal memory access with ticket_key.filename#1120SolidWallOfCode merged 1 commit intoapache:masterfrom
SolidWallOfCode merged 1 commit intoapache:masterfrom
Conversation
SolidWallOfCode
suggested changes
Oct 18, 2016
| ats_free(CACertRelativePath); | ||
|
|
||
| #if HAVE_OPENSSL_SESSION_TICKETS | ||
| REC_ReadConfigStringAlloc(ticket_key_filename, "proxy.config.ssl.server.ticket_key.filename"); |
Member
There was a problem hiding this comment.
Why not just embed the call in the if?
if (REC_ERR_OKAY == REC_ReadConfigString(...)) {
Contributor
Author
There was a problem hiding this comment.
was avoiding long statement
| ats_free_null(dhparamsFile); | ||
| ats_free_null(ssl_wire_trace_ip); | ||
| ats_free_null(ticket_key_filename); | ||
| ticket_key_filename = (char *)ats_free_null(ticket_key_filename); |
Member
There was a problem hiding this comment.
Let's go bigger. Pull the code out of the constructor, make it a method, and then call that at the end of this method. Reset everything, really clean up.
c66b94a to
56e5e91
Compare
Contributor
Author
|
Please review @SolidWallOfCode |
56e5e91 to
b91aabe
Compare
SolidWallOfCode
approved these changes
Oct 19, 2016
Member
|
Looks good. |
Contributor
|
Looks like we have merge conflicts now. |
Contributor
Author
|
I will do a local merge and resolve |
cf9db39 to
76e2f7a
Compare
Contributor
Author
|
The conflict is resolved. Please check |
76e2f7a to
e3dab5e
Compare
bneradt
pushed a commit
to bneradt/trafficserver
that referenced
this pull request
Jan 23, 2026
…he#1120) * Add AuTest to reproduce apache#9275 This reproduces a variant of apache#9275 where we fail on the cache lookup. If the cache lookup were to succeed, it should also fail on the cache write, so this one test should cover both bugs. * Reuse prepared cache write on redirected request Fixes apache#9275. When there is no parent proxy and ATS is following a redirect, it will do a cache lookup on the redirected request. If that lookup results in a cache miss, it will start to prepare a new cache write, which is wrong. The state machine intentionally leaves the write open so we can re-use the connection; this is possible to ascertain from the code and from comments to that effect. We should only open a new write if we don't already have one when following a redirect. (cherry picked from commit 875463c) Co-authored-by: JosiahWI <41302989+JosiahWI@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Avoiding illegal memory access by checking the return value of readConfigStringAlloc .