GitHub user norrs opened a pull request:
https://github.com/apache/thrift/pull/1314
THRIFT-4263: Fix use after free bug for thrown exceptions
Exceptions thrown through PHPExceptionWrapper are prematurely freed at the
end
of the catch block, even though zend_throw_exception_object expects to take
ownership of the value.
Ensure we free return_value in case of exceptions
Test binary deserialization of insufficient data which verifies we can cast
exception to string to verify against memory corruption when transport casts
exceptions.
Patch: HÃ¥kon Hitland <[email protected]>
Patch: Roy Sindre Norangshol <[email protected]>
This closes #4263
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/norrs/thrift THRIFT-4263
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/thrift/pull/1314.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 #1314
----
commit 7e64cc664170999e8224c7df4a689efebc55aea5
Author: Roy Sindre Norangshol <[email protected]>
Date: 2017-07-26T16:19:38Z
THRIFT-4263: Test case for 'Fix use after free bug for thrown exceptions'
Test binary deserialization of insufficient data which verifies we can cast
exception to string to verify against memory corruption when transport casts
exceptions.
Patch: HÃ¥kon Hitland <[email protected]>
Patch: Roy Sindre Norangshol <[email protected]>
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---