-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-95041: Fix several minor issues in syslog.openlog() #95058
Merged
serhiy-storchaka
merged 3 commits into
python:main
from
serhiy-storchaka:syslog-openlog
Jul 26, 2022
Merged
gh-95041: Fix several minor issues in syslog.openlog() #95058
serhiy-storchaka
merged 3 commits into
python:main
from
serhiy-storchaka:syslog-openlog
Jul 26, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* 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.
* Possible use of freed memory if syslog.openlog() is called while the GIL is released in syslog.syslog().
Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Jul 26, 2022
…H-95058) * 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. * Possible use of freed memory if syslog.openlog() is called while the GIL is released in syslog.syslog(). (cherry picked from commit 68c555a) Co-authored-by: Serhiy Storchaka <[email protected]>
GH-95261 is a backport of this pull request to the 3.11 branch. |
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this pull request
Jul 26, 2022
…H-95058) * 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. * Possible use of freed memory if syslog.openlog() is called while the GIL is released in syslog.syslog(). (cherry picked from commit 68c555a) Co-authored-by: Serhiy Storchaka <[email protected]>
GH-95262 is a backport of this pull request to the 3.10 branch. |
miss-islington
added a commit
that referenced
this pull request
Jul 26, 2022
* 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. * Possible use of freed memory if syslog.openlog() is called while the GIL is released in syslog.syslog(). (cherry picked from commit 68c555a) Co-authored-by: Serhiy Storchaka <[email protected]>
ambv
pushed a commit
that referenced
this pull request
Jul 26, 2022
…-95261) * 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. * Possible use of freed memory if syslog.openlog() is called while the GIL is released in syslog.syslog(). (cherry picked from commit 68c555a) Co-authored-by: Serhiy Storchaka <[email protected]>
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
global reference to ident. Now the C string saved internally in the previous
call to openlog() points to the freed memory.
reference to ident is decrefed before setting the new value.