[issue41180] marshal load bypass code.__new__ audit event

2021-03-05 Thread Yunfan Zhan
Change by Yunfan Zhan : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue41180] marshal load bypass code.__new__ audit event

2020-07-02 Thread Yunfan Zhan
Yunfan Zhan added the comment: Before this, we only audit code.__new__ and code.replace, as these methods allow constructing arbitrary code objects, and we don't audit code object coming from the normal way (like compile,exec,eval). If the event is raised in PyCode_NewWithPosOnlyArgs

[issue41180] marshal load bypass code.__new__ audit event

2020-07-01 Thread Yunfan Zhan
Change by Yunfan Zhan : -- keywords: +patch pull_requests: +20421 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21271 ___ Python tracker <https://bugs.python.org/issu

[issue41180] marshal load bypass code.__new__ audit event

2020-07-01 Thread Yunfan Zhan
New submission from Yunfan Zhan : While `code.__new__` is being audited, using `marshal.loads` to create a code object will trigger no events. Therefore, either `marshal.load(s)` event itself should be audited, or `code.__new__` should be triggered when marshal type is TYPE_CODE