[issue41162] Clear audit hooks after destructors

2020-07-06 Thread Steve Dower
Steve Dower added the comment: Merged the initial fix, but we now need to find any exploitable paths that remain. Considering how late in finalization they now run, they're very unlikely to succeed at doing anything interesting. However, they'd also qualify as bugs (potentially crashes),

[issue41162] Clear audit hooks after destructors

2020-07-03 Thread Steve Dower
Steve Dower added the comment: New changeset b9e288cc1bfd583e887f784e38d9c511b43c0c3a by Steve Dower in branch '3.8': bpo-41162: Clear audit hooks later during finalization (GH-21222) https://github.com/python/cpython/commit/b9e288cc1bfd583e887f784e38d9c511b43c0c3a --

[issue41162] Clear audit hooks after destructors

2020-07-03 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +20456 pull_request: https://github.com/python/cpython/pull/21304 ___ Python tracker ___

[issue41162] Clear audit hooks after destructors

2020-07-03 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +20452 pull_request: https://github.com/python/cpython/pull/21303 ___ Python tracker ___

[issue41162] Clear audit hooks after destructors

2020-07-03 Thread Steve Dower
Steve Dower added the comment: New changeset e1d4fdc53347617bea1aff0d7112471453f65003 by Steve Dower in branch '3.9': bpo-41162: Clear audit hooks later during finalization (GH-21222) https://github.com/python/cpython/commit/e1d4fdc53347617bea1aff0d7112471453f65003 --

[issue41162] Clear audit hooks after destructors

2020-07-03 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +20451 pull_request: https://github.com/python/cpython/pull/21302 ___ Python tracker ___

[issue41162] Clear audit hooks after destructors

2020-07-03 Thread Steve Dower
Steve Dower added the comment: New changeset daa0fe03a517d335d48e65ace8e5da636e265a8f by Konge in branch 'master': bpo-41162: Clear audit hooks later during finalization (GH-21222) https://github.com/python/cpython/commit/daa0fe03a517d335d48e65ace8e5da636e265a8f --

[issue41162] Clear audit hooks after destructors

2020-07-02 Thread Steve Dower
Steve Dower added the comment: PR 21222 (with test updates) is a good fix, though we know there can still be arbitrary code executed afterwards. But it's not in a place where we can reliably hook. Probably the best thing to do is to make sure that events are raised for anything that would

[issue41162] Clear audit hooks after destructors

2020-07-02 Thread Frank
Change by Frank : -- nosy: +frankli ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41162] Clear audit hooks after destructors

2020-06-29 Thread JIanqiu Tao
Change by JIanqiu Tao : -- pull_requests: +20374 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/21222 ___ Python tracker ___

[issue41162] Clear audit hooks after destructors

2020-06-29 Thread JIanqiu Tao
JIanqiu Tao added the comment: Patch attached below works well, but with less functionality for users' audit hook. Pure Python audit hook implement looks safe enough. Should we need call _PySys_ClearAuditHooks earlier for more functionality? -- keywords: +patch nosy: +zkonge Added

[issue41162] Clear audit hooks after destructors

2020-06-29 Thread Steve Dower
New submission from Steve Dower : Because of when _Py_ClearAuditHooks is called during finalization, it is possible that __del__ destructors will be called after hooks have been cleared. Audit events that would be raised here are dropped. We should ensure these events are received by any