-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
Closed
Labels
3.10only security fixesonly security fixes3.11only security fixesonly security fixes3.12only security fixesonly security fixespendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is providedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
There are several issues with corner cases in syslog.openlog()
.
syslog_get_argv()
swallows exceptions, but not in all cases.- if
ident
is non UTF-8 encodable,syslog.openlog()
fails after setting the global reference toident
. Now the C string saved internally in the previous call toopenlog()
points to the freed memory. PySys_Audit()
can crash ifident
is NULL.- There may be a race condition with
syslog.syslog()
, because the global reference toident
is decrefed before setting the new value.
And, since syslog.syslog()
releases the GIL, there may be a race condition syslog.syslog()
with syslog.openlog()
and syslog.closelog()
which can decref the global reference to ident
.
P.S. @noamcohen97 noticed yet one issue in syslog.syslog()
(potential returning a value from a function while an exception is set #95012 (comment)) and fixed it.
Metadata
Metadata
Assignees
Labels
3.10only security fixesonly security fixes3.11only security fixesonly security fixes3.12only security fixesonly security fixespendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is providedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error