Skip to content

Sanitize metadata image names in generated r2 script output#3

Merged
trufae merged 1 commit into
mainfrom
codex/propose-fix-for-heap-overflow-vulnerability
Jun 10, 2026
Merged

Sanitize metadata image names in generated r2 script output#3
trufae merged 1 commit into
mainfrom
codex/propose-fix-for-heap-overflow-vulnerability

Conversation

@trufae

@trufae trufae commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Motivation

  • Prevent command/script injection in generated radare2 scripts by sanitizing metadata-derived image names before embedding them in emitted r2 flag/comment commands.

Description

  • Call r_name_filter(im, -1) when im is non-NULL in emit_r2_method so image names read from metadata are filtered prior to any printf that emits f or CCu commands; the change is limited to src/main.c and preserves existing output for valid names.

Testing

  • Attempted make -j4 in the container but the build failed due to missing radare2 development headers (missing r_util.h), so a full build/test could not be executed.

Codex Task

@trufae trufae merged commit 6768e22 into main Jun 10, 2026
13 of 14 checks passed
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