Skip to content

gh-148395: Fix a possible UAF in {LZMA,BZ2,_Zlib}Decompressor#148396

Open
StanFromIreland wants to merge 3 commits intopython:mainfrom
StanFromIreland:mem-stale
Open

gh-148395: Fix a possible UAF in {LZMA,BZ2,_Zlib}Decompressor#148396
StanFromIreland wants to merge 3 commits intopython:mainfrom
StanFromIreland:mem-stale

Conversation

@StanFromIreland
Copy link
Copy Markdown
Member

@StanFromIreland StanFromIreland commented Apr 11, 2026

Copy link
Copy Markdown
Member

@emmatyping emmatyping left a comment

Choose a reason for hiding this comment

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

Thank you for fixing this!

@picnixz picnixz changed the title gh-148395: Fix a possible UAF in {LZMA, BZ2, _Zlib}Decompressor gh-148395: Fix a possible UAF in {LZMA,BZ2,_Zlib}Decompressor Apr 11, 2026
with self.assertRaises(TypeError):
pickle.dumps(BZ2Decompressor(), proto)

def test_decompressor_reuse_after_tail_copy_memory_error(self):
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.

Considering we need to hit an error path with a MemoryError, I'm not sure we really need a test. Sometimes we do add tests, sometimes not. I don't think there is a need to add a test. The test also don't assert that we hit the goto so I don't think we need it.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants