[New-bugs-announce] [issue42655] Fix subprocess extra_groups gid conversion
report at bugs.python.org
Wed Dec 16 05:05:22 EST 2020
New submission from Jakub Kulik <kulikjak at gmail.com>:
C function `subprocess_fork_exec` incorrectly transforms gids from the `extra_groups` argument because it passes `unsigned long*` rather than `pid_t*` into the `_Py_Gid_Converter()`. Assuming that `gid_t` is 32 bit and `unsigned long` is 64 bit (which it often is), `*(gid_t *)p = gid;` then incorrectly overwrites only part of that variable, leaving the other one filled with previous garbage.
I found this on Solaris, but I am pretty sure that this doesn't work correctly on Linux as well, since both use `unsigned int` as `gid_t`.
components: Extension Modules
title: Fix subprocess extra_groups gid conversion
versions: Python 3.10, Python 3.9
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce