Skip to content

Issues caused by reading arbitrary number of bytes #141713

Open
5 of 8 issues completed
Open

Description

@serhiy-storchaka

This is a meta-issue for a group of similar issues that have the same root cause: reading a number of bytes when the number is specified by the user/external source. Since read(n) is usually implemented by allocating a buffer of size n and then reading into it, this can cause arbitrary memory consumption which leads to swapping.

Linked PRs

Sub-issues

Sub-issues

5 of 8 Issues completed
Loading 8 sub-issues

Activity

  1. added
    type-bug
    interpreter-core
    extension-modules
    on Nov 18, 2025
  2. cmaloney commented on Nov 18, 2025

    @cmaloney
    Contributor

    There's a related PSRT that arbitrary-size reads should use non-linear buffer expansion: #119514 (comment)

  3. added a commit that references this issue on Nov 27, 2025
  4. woodruffw commented on Aug 12, 2026

    @woodruffw
    Contributor

    #155633 may fit under this umbrella as well 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

extension-modulesinterpreter-coretopic-IOtype-bug

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions