Skip to content

poplib.py: Missing integer parsing validation causes client crash on invalid server response #130637

Closed

Description

@NErinola

Crash report

What happened?

In poplib.py at line 229 the code attempts to convert a server response to an integer without first verifying that the response is numeric. If the server returns a non-numeric response, the int() conversion fails causing the client to crash.

CPython versions tested on:

3.12

Operating systems tested on:

Linux

Output from running 'python -VV' on the command line:

No response

Linked PRs

Activity

  1. added
    type-crashA hard crash of the interpreter, possibly with a core dump
    on Feb 27, 2025
  2. added a commit that references this issue on Feb 27, 2025
  3. added
    type-bugAn unexpected behavior, bug, or error
    stdlibStandard Library Python modules in the Lib/ directory
    and removed
    type-crashA hard crash of the interpreter, possibly with a core dump
    on Feb 28, 2025
  4. encukou commented on Feb 28, 2025

    @encukou
    Member

    This is a wrong exception (ValueError), not a hard crash, right?

  5. added a commit that references this issue on Mar 2, 2025
  6. added 2 commits that reference this issue on Mar 2, 2025
  7. added 2 commits that reference this issue on Mar 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions