Skip to content

Fix zip source double free in fs_zip_dir#25969

Open
trufae wants to merge 1 commit into
masterfrom
codex/propose-fix-for-double-free-vulnerability
Open

Fix zip source double free in fs_zip_dir#25969
trufae wants to merge 1 commit into
masterfrom
codex/propose-fix-for-double-free-vulnerability

Conversation

@trufae

@trufae trufae commented May 15, 2026

Copy link
Copy Markdown
Collaborator

Motivation

  • Prevent a double free/use-after-free when enumerating untrusted ZIP contents caused by freeing a zip_source_t after ownership was transferred to libzip via zip_open_from_source() in libr/fs/p/fs_zip.c.

Description

  • Remove the extra zip_source_free(zs) call after zip_close(za) in fs_zip_dir() so ownership semantics match libzip's zip_open_from_source() behavior.

Testing

  • Ran repository checks including git diff --check, viewing the git diff for libr/fs/p/fs_zip.c, and git status --short, and committed the change; all commands completed successfully.

Codex Task

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.

1 participant