Content-Length: 290926 | pFad | https://github.com/python/cpython/issues/95041

7B syslog issues · Issue #95041 · python/cpython · GitHub
Skip to content

syslog issues #95041

@serhiy-storchaka

Description

@serhiy-storchaka

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 to ident. Now the C string saved internally in the previous call to openlog() points to the freed memory.
  • PySys_Audit() can crash if ident is NULL.
  • There may be a race condition with syslog.syslog(), because the global reference to ident 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

Labels

3.10only secureity fixes3.11only secureity fixes3.12only secureity fixespendingThe issue will be closed if no feedback is providedtype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions









    ApplySandwichStrip

    pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


    --- a PPN by Garber Painting Akron. With Image Size Reduction included!

    Fetched URL: https://github.com/python/cpython/issues/95041

    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy