Skip to content

Overflow if co_linetable is absurdly large #126859

@federicovalenso

Description

@federicovalenso

Bug report

Bug description:

f.__code__ = f.__code__.replace(co_linetable=bytes(bytearray(2**31+1)))

It could lead to overflow in write_location_info_entry.

CPython versions tested on:

3.11

Operating systems tested on:

Linux

Metadata

Metadata

Assignees

Labels

3.12only security fixes3.13bugs and security fixes3.14bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions