Skip to content

Sanitize Unity image names before emitting r2 script commands#2

Closed
trufae wants to merge 1 commit into
mainfrom
codex/fix-unescaped-unity-image-names-vulnerability
Closed

Sanitize Unity image names before emitting r2 script commands#2
trufae wants to merge 1 commit into
mainfrom
codex/fix-unescaped-unity-image-names-vulnerability

Conversation

@trufae

@trufae trufae commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Motivation

  • Fix a command-injection vulnerability where attacker-controlled Unity image names were written directly into radare2 script f and CCu lines without filtering, allowing injected r2 commands when the generated script is sourced.

Description

  • Apply r_name_filter(im, -1) to the image name im in emit_r2_method (src/main.c) before emitting both the symbol (f) and comment (CCu) lines, preserving existing fallback behavior for missing or empty image names.

Testing

  • Ran make -j2 in this environment but the build failed due to missing radare2 development headers (r_util.h), so no successful compile-time verification could be completed here.

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