GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — syslog issues · Issue #95041 · python/cpython

syslog issues #95041

New issue
Copy link
New issue
Copy link
Closed
Closed
syslog issues#95041
Copy link
Assignees
serhiy-storchaka
Labels
3.10 (EOL)end of lifeend of life3.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

@serhiy-storchaka
serhiy-storchaka
opened on Jul 20, 2022
Issue body actions

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.

Activity

  1. serhiy-storchaka
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    3.11only security fixesonly security fixes
    3.12only security fixesonly security fixes
    on Jul 20, 2022
  2. serhiy-storchaka
    self-assigned this
    on Jul 20, 2022
  3. serhiy-storchaka
    added
    3.10 (EOL)end of lifeend of life
    on Jul 20, 2022
  4. serhiy-storchaka
    added a commit that references this issue on Jul 20, 2022

    pythongh-95041: Fix several minor issues in syslog.openlog()

    c317048
  5. serhiy-storchaka commented on Jul 25, 2022

    @serhiy-storchaka
    serhiy-storchaka
    on Jul 25, 2022 · Hidden as resolved
    Author
    show commentMore actions
  6. arhadthedev commented on Jul 25, 2022

    @arhadthedev
    arhadthedev
    on Jul 25, 2022 · Hidden as resolved
    show commentMore actions
  7. miss-islington
    added a commit that references this issue on Jul 26, 2022

    pythongh-95041: Fix several minor issues in syslog.openlog() (pythonG…

    9173e7b
  8. serhiy-storchaka
    added a commit that references this issue on Jul 26, 2022

    gh-95041: Fix several minor issues in syslog.openlog() (GH-95058)

    68c555a
  9. miss-islington
    added 2 commits that reference this issue on Jul 26, 2022

    pythongh-95041: Fix several minor issues in syslog.openlog() (pythonG…

    abd4aea

    gh-95041: Fix several minor issues in syslog.openlog() (GH-95058)

    dd0c1a3
  10. ambv
    added a commit that references this issue on Jul 26, 2022

    gh-95041: Fix several minor issues in syslog.openlog() (GH-95058) (GH…

    820904e
  11. serhiy-storchaka
    added a commit that references this issue on Jul 26, 2022

    gh-95041: Fail syslog.syslog in case inner call to syslog.openlog fai…

    b1f648e
  12. miss-islington
    added 2 commits that reference this issue on Jul 26, 2022

    pythongh-95041: Fail syslog.syslog in case inner call to syslog.openl…

    a9c68d5

    pythongh-95041: Fail syslog.syslog in case inner call to syslog.openl…

    5ae3cb1
  13. erlend-aasland commented on Jul 26, 2022

    @erlend-aasland
    erlend-aasland
    on Jul 26, 2022
    Contributor
    More actions

    I'm keeping this open until you decide about the NEWS entry, Serhiy. I'll mark it pending close, though.

  14. erlend-aasland
    added
    pendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is provided
    on Jul 26, 2022
  15. erlend-aasland commented on Jul 26, 2022

    @erlend-aasland
    erlend-aasland
    on Jul 26, 2022
    Contributor
    More actions

    Fixed by:

    • gh-95041: Fix several minor issues in syslog.openlog() #95058
    • [3.11] gh-95041: Fix several minor issues in syslog.openlog() (GH-95058) #95261
    • [3.10] gh-95041: Fix several minor issues in syslog.openlog() (GH-95058) #95262
    • gh-95041: Fail syslog.syslog in case inner call to syslog.openlog fails #95264
    • [3.10] gh-95041: Fail syslog.syslog in case inner call to syslog.openlog fails (GH-95264) #95275
    • [3.11] gh-95041: Fail syslog.syslog in case inner call to syslog.openlog fails (GH-95264) #95277
  16. miss-islington
    added 2 commits that reference this issue on Jul 26, 2022

    gh-95041: Fail syslog.syslog in case inner call to syslog.openlog fai…

    2f9e47c

    gh-95041: Fail syslog.syslog in case inner call to syslog.openlog fai…

    9640c4c
  17. erlend-aasland
    closed this as completedon Jul 27, 2022
  18. erlend-aasland commented on Jul 27, 2022

    @erlend-aasland
    erlend-aasland
    on Jul 27, 2022
    Contributor
    More actions

    (Ooops, sorry; pressed the wrong button)

  19. erlend-aasland
    reopened this on Jul 27, 2022
  20. hauntsaninja commented on Oct 12, 2022

    @hauntsaninja
    hauntsaninja
    on Oct 12, 2022
    Contributor
    More actions

    We kept this open based on #95264 (comment)

    It looks like Serhiy added the tests in #97953 but chose not to add a changelog entry, so I think we can close this out.

    Reacted by Noam Cohen
  21. hauntsaninja
    closed this as completedon Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @serhiy-storchaka
    serhiy-storchaka

Labels

3.10 (EOL)end of lifeend of life3.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

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.