[
https://issues.apache.org/jira/browse/TS-4785?focusedWorklogId=27185&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-27185
]
ASF GitHub Bot logged work on TS-4785:
--------------------------------------
Author: ASF GitHub Bot
Created on: 25/Aug/16 20:03
Start Date: 25/Aug/16 20:03
Worklog Time Spent: 10m
Work Description: GitHub user jpeach opened a pull request:
https://github.com/apache/trafficserver/pull/927
TS-4785: Stale while revalidate plugin memory corruption.
This fixes a couple of memory corruption bugs in the stale_while_revalidate
plugin.
First, when copying the client sockaddr, we need to copy the specific
address family structure, not the untyped struct sockaddr.
Next, we zero when allocating to make initialization more reliable.
Finally, we deal with receiving TS_EVENT_HTTP_CACHE_LOOKUP_COMPLETE
multiple times, which otherwise leads to a double free.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jpeach/trafficserver fix/4785
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/trafficserver/pull/927.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #927
----
commit 3ea1bce32312aa01f7d5501313622f88b2842fcd
Author: James Peach <[email protected]>
Date: 2016-08-25T19:57:20Z
TS-4785: Stale while revalidate plugin memory corruption.
This fixes a couple of memory corruption bugs in the stale_while_revalidate
plugin.
First, when copying the client sockaddr, we need to copy the specific
address family structure, not the untyped struct sockaddr.
Next, we zero when allocating to make initialization more reliable.
Finally, we deal with receiving TS_EVENT_HTTP_CACHE_LOOKUP_COMPLETE
multiple times, which otherwise leads to a double free.
----
Issue Time Tracking
-------------------
Worklog Id: (was: 27185)
Time Spent: 10m
Remaining Estimate: 0h
> Stale while revalidate plugin memory corruption.
> ------------------------------------------------
>
> Key: TS-4785
> URL: https://issues.apache.org/jira/browse/TS-4785
> Project: Traffic Server
> Issue Type: Bug
> Components: Plugins
> Reporter: James Peach
> Time Spent: 10m
> Remaining Estimate: 0h
>
> The {{stale_while_revalidate}} plugin fails to copy the sockaddr from
> {{TSHttpTxnClientAddrGet}}, which leads to reading out of bounds when the
> address is passed to {{TSHttpConnect}}.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)