Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Memory Safety Issue in marshal.c TYPE_SLICE Case #136053

Closed
Labels
3.14bugs and security fixes3.15new features, bugs and security fixesextension-modulesC modules in the Modules dirtype-bugAn unexpected behavior, bug, or error
@akshat62

Description

@akshat62

Bug report

Bug description:

Description

Location:Python/marshal.c, functionr_object(),TYPE_SLICE case

Issue: The code didn't validate the return value ofr_ref_reserve() before passing it tor_ref_insert(). Ifr_ref_reserve() fails and returns -1, this would cause an out-of-bounds memory access whenr_ref_insert() tries to accessp->refs[-1].

Root Cause: Inconsistent error handling compared to other similar cases in the same file (e.g.,TYPE_CODE andTYPE_FROZENSET properly check forr_ref_reserve() failure).

Impact

  • Security: Potential memory corruption vulnerability exploitable via crafted marshal data
  • Stability: Could cause crashes when deserializing slice objects in error conditions
  • Scope: Affects applications using the marshal module to deserialize untrusted data

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.14bugs and security fixes3.15new features, bugs and security fixesextension-modulesC modules in the Modules dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp