You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
_winapi.CreateProcess audit event passes garbage for command_line #159237
In the _winapi.CreateProcess audit event, the second argument (command_line) is a Python object, but it is passed to PySys_Audit with the u format, so audit hooks may receive garbage instead of the command line.
Additional confirmation on CPython 3.13.15, Windows x64.
The standalone script below ran twice using -I -B -S. Both runs observed one _winapi.CreateProcess audit event with three arguments of types str, str, NoneType. The executable and current directory matched, but the command was '\x03' rather than the supplied command; command equality and identity were false. Each run ended with the expected AssertionError.
The hook raised its sentinel before native process creation. Each supervised job recorded one lifetime process (the diagnostic itself), zero remaining processes, and completed shutdown. The invalid environment is an additional fallback to reject the operation before native creation if the target audit event is absent. The particular garbage character is not assumed stable.
The uuu → uOu correction in PR #159238 matches the source types. No patched interpreter was built or tested in these runs. This confirmation and script were prepared with AI assistance; the observations come from two separately supervised executions. No security severity or exploit impact is claimed.
Activity
sduchene-208 commentedon Nov 1, 2026
Additional confirmation on CPython 3.13.15, Windows x64.
The standalone script below ran twice using
-I -B -S. Both runs observed one_winapi.CreateProcessaudit event with three arguments of typesstr, str, NoneType. The executable and current directory matched, but the command was'\x03'rather than the supplied command; command equality and identity were false. Each run ended with the expectedAssertionError.The hook raised its sentinel before native process creation. Each supervised job recorded one lifetime process (the diagnostic itself), zero remaining processes, and completed shutdown. The invalid environment is an additional fallback to reject the operation before native creation if the target audit event is absent. The particular garbage character is not assumed stable.
The
uuu→uOucorrection in PR #159238 matches the source types. No patched interpreter was built or tested in these runs. This confirmation and script were prepared with AI assistance; the observations come from two separately supervised executions. No security severity or exploit impact is claimed.Executed standalone reproducer
Deny direct _winapi.CreateProcess calls whose audit command line is u…
gh-159237: Fix buffer type confusion in `_winapi.CreateProcess` audit…
vstinner commentedon Dec 4, 2026
Thanks for the bug report and the fix @aisk.