Skip to content

gh-104282: Fix null pointer dereference in lzma._decode_filter_properties#104283

Merged
serhiy-storchaka merged 4 commits into
python:mainfrom
chgnrdv:_lzma-_decode_filter_properties-fix-NULL-ptr-access
Jan 17, 2024
Merged

gh-104282: Fix null pointer dereference in lzma._decode_filter_properties#104283
serhiy-storchaka merged 4 commits into
python:mainfrom
chgnrdv:_lzma-_decode_filter_properties-fix-NULL-ptr-access

Conversation

@chgnrdv

@chgnrdv chgnrdv commented May 8, 2023

Copy link
Copy Markdown
Contributor

* add `options` field NULL checks in `build_filter_spec` for BCJ filters and in `_decode_filter_properties` implementation
* add tests
Comment thread Misc/NEWS.d/next/Library/2023-05-08-09-30-00.gh-issue-104282.h4c6Eb.rst Outdated
Comment thread Modules/_lzmamodule.c Outdated
@serhiy-storchaka serhiy-storchaka added type-crash A hard crash of the interpreter, possibly with a core dump needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Jan 17, 2024

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@serhiy-storchaka
serhiy-storchaka enabled auto-merge (squash) January 17, 2024 12:56
@serhiy-storchaka
serhiy-storchaka enabled auto-merge (squash) January 17, 2024 13:01
@serhiy-storchaka serhiy-storchaka changed the title gh-104282: Fix use of uninitialized value in lzma._decode_filter_properties gh-104282: Fix null pointer dereference in lzma._decode_filter_properties Jan 17, 2024
@serhiy-storchaka
serhiy-storchaka merged commit 0154405 into python:main Jan 17, 2024
@miss-islington-app

Copy link
Copy Markdown

Thanks @chgnrdv for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 17, 2024
…_properties` (pythonGH-104283)

(cherry picked from commit 0154405)

Co-authored-by: Radislav Chugunov <52372310+chgnrdv@users.noreply.github.com>
@bedevere-app

bedevere-app Bot commented Jan 17, 2024

Copy link
Copy Markdown

GH-114181 is a backport of this pull request to the 3.12 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 17, 2024
…_properties` (pythonGH-104283)

(cherry picked from commit 0154405)

Co-authored-by: Radislav Chugunov <52372310+chgnrdv@users.noreply.github.com>
@bedevere-app bedevere-app Bot removed the needs backport to 3.12 only security fixes label Jan 17, 2024
@bedevere-app

bedevere-app Bot commented Jan 17, 2024

Copy link
Copy Markdown

GH-114182 is a backport of this pull request to the 3.11 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.11 only security fixes label Jan 17, 2024
serhiy-storchaka pushed a commit that referenced this pull request Jan 17, 2024
…r_properties` (GH-104283) (GH-114182)

(cherry picked from commit 0154405)

Co-authored-by: Radislav Chugunov <52372310+chgnrdv@users.noreply.github.com>
serhiy-storchaka pushed a commit that referenced this pull request Jan 17, 2024
…r_properties` (GH-104283) (GH-114181)

(cherry picked from commit 0154405)

Co-authored-by: Radislav Chugunov <52372310+chgnrdv@users.noreply.github.com>
kulikjak pushed a commit to kulikjak/cpython that referenced this pull request Jan 22, 2024
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-crash A hard crash of the interpreter, possibly with a core dump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

lzma._decode_filter_properties crashes with BCJ filter and buffer of zero length

3 participants