[GH-ISSUE #7072] [Bug] REA_GHIDRA_LANGUAGE_ID rejects stock ARM BE8 and M16C language IDs #4265

Closed
opened 2026-10-31 00:48:17 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @Adolanium on GitHub (Oct 25, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/7072

Before submitting

  • I searched the open and closed issues for a related report.
  • I removed credentials, tokens, private paths, and sensitive target data.

Area

Setup, packaging, or upgrade

Observed behavior

Setting REA_GHIDRA_LANGUAGE_ID to ARM:LEBE:32:v8LEInstruction, ARM:LEBE:32:v7LEInstruction, M16C/60:LE:16:default or M16C/80:LE:16:default fails configuration parsing with "must be a Ghidra language ID such as x86:LE:32:default". These IDs ship with Ghidra in its .ldefs language definitions.

Reproduction

Ran on Linux (WSL Ubuntu, Node 24.22.1) at upstream/main through configuration parsing in a test: each of the four values is refused before Ghidra starts.

Expected behavior

The four stock IDs are accepted; the installed-language check still applies.

Impact and scope

BE8 ARM firmware and M16C ROMs cannot be analyzed with an explicit Ghidra language.

REA version

6.7.0, revision 8e6a95788

Runtime and platform

Linux (WSL Ubuntu), Node 24.22.1

Target and artifact context

No target; configuration only.

Interface

CLI

Earliest failure stage

Setup or provider admission

Relevant output or evidence

Root cause and fix are in #7070, with the regression test.

Typed outcome or recovery expected

No new error.

Analysis or suspected cause

Root cause and fix are in #7070.

Additional context

Fixed by #7070.

Originally created by @Adolanium on GitHub (Oct 25, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/7072 ### Before submitting - [x] I searched the open and closed issues for a related report. - [x] I removed credentials, tokens, private paths, and sensitive target data. ### Area Setup, packaging, or upgrade ### Observed behavior Setting `REA_GHIDRA_LANGUAGE_ID` to `ARM:LEBE:32:v8LEInstruction`, `ARM:LEBE:32:v7LEInstruction`, `M16C/60:LE:16:default` or `M16C/80:LE:16:default` fails configuration parsing with "must be a Ghidra language ID such as x86:LE:32:default". These IDs ship with Ghidra in its `.ldefs` language definitions. ### Reproduction Ran on Linux (WSL Ubuntu, Node 24.22.1) at upstream/main through configuration parsing in a test: each of the four values is refused before Ghidra starts. ### Expected behavior The four stock IDs are accepted; the installed-language check still applies. ### Impact and scope BE8 ARM firmware and M16C ROMs cannot be analyzed with an explicit Ghidra language. ### REA version 6.7.0, revision `8e6a95788` ### Runtime and platform Linux (WSL Ubuntu), Node 24.22.1 ### Target and artifact context No target; configuration only. ### Interface CLI ### Earliest failure stage Setup or provider admission ### Relevant output or evidence Root cause and fix are in #7070, with the regression test. ### Typed outcome or recovery expected No new error. ### Analysis or suspected cause Root cause and fix are in #7070. ### Additional context Fixed by #7070.
Author
Owner

@XinwangTao commented on GitHub (Oct 25, 2026):

这个校验确实过窄:Ghidra 语言 ID 本身不是固定三段式,ARM 的 LEBE 双端标记和 M16C/60 这类带斜杠的处理器名都是 .ldefs 里的合法形态,按 "x86:LE:32:default" 的正则模板去卡会误拒大量真实平台。认可 #7070 接受 LEBE endianness 变体和 slash 处理器名、并保留 installed-language check 的方向。一个补充建议:与其维护一份"看起来像语言 ID"的格式正则,不如直接对已安装语言的 ID 集合做成员校验——这样格式问题天然消失,错误信息还能带上实际可用的语言列表,对配置纠错更友好。

<!-- gh-comment-id:6393599542 --> @XinwangTao commented on GitHub (Oct 25, 2026): 这个校验确实过窄:Ghidra 语言 ID 本身不是固定三段式,ARM 的 LEBE 双端标记和 M16C/60 这类带斜杠的处理器名都是 .ldefs 里的合法形态,按 "x86:LE:32:default" 的正则模板去卡会误拒大量真实平台。认可 #7070 接受 LEBE endianness 变体和 slash 处理器名、并保留 installed-language check 的方向。一个补充建议:与其维护一份"看起来像语言 ID"的格式正则,不如直接对已安装语言的 ID 集合做成员校验——这样格式问题天然消失,错误信息还能带上实际可用的语言列表,对配置纠错更友好。
Author
Owner

@Adolanium commented on GitHub (Oct 25, 2026):

Thanks. Installed-language membership is already checked: after configuration parsing, GhidraLanguageCatalog looks the ID up in the installed .ldefs before analysis starts. The syntax check runs earlier, when the setting is parsed, before a Ghidra installation is located, so it can only judge the form of the ID. #7070 keeps that split and only widens the form to what stock Ghidra languages use.

<!-- gh-comment-id:6394015823 --> @Adolanium commented on GitHub (Oct 25, 2026): Thanks. Installed-language membership is already checked: after configuration parsing, `GhidraLanguageCatalog` looks the ID up in the installed `.ldefs` before analysis starts. The syntax check runs earlier, when the setting is parsed, before a Ghidra installation is located, so it can only judge the form of the ID. #7070 keeps that split and only widens the form to what stock Ghidra languages use.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#4265
No description provided.