New submission from Jakub Kulik <kulik...@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
messages: 383132
nosy: kulikjak
priority: normal
severity: normal
status: open
title: Fix subprocess extra_groups gid conversion
versions: Python 3.10, Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42655>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to