[GH-ISSUE #8883] AMDGPU metadata with an array or map past 65,536 entries is reported as malformed #7781

Open
opened 2026-11-04 12:09:29 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @Adolanium on GitHub (Nov 4, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/8883

Before submitting

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

Area

Native analysis or decompilation

Observed behavior

inspect_gpu_code_objects reports an AMDGPU object as inspection: "malformed" when its metadata note is valid MessagePack holding an array of more than 65,536 elements or a map of more than 65,536 pairs. The same note with a 65,536-element array is inventoried normally.

Reproduction

Ran on Linux (WSL Ubuntu, Node 24.22.1) at upstream/main f042aaaf9 through MCP inspect_gpu_code_objects with analysis: "inventory": an AMDGPU ELF whose note metadata adds "amdhsa.extra" as a 65,537-element array of nil (or a 65,537-pair map) returns the amdgpu object as malformed.

Expected behavior

The input is well formed and only exceeds the decoder's container limit, so the object is reported as capacity, like the other AMDGPU metadata budgets.

Impact and scope

An analyst is told the code object is corrupt when REA only declined to decode it within its limits.

REA version

revision f042aaaf9

Runtime and platform

Linux (WSL Ubuntu), Node 24.22.1

Target and artifact context

Synthetic AMDGPU ELF test fixture.

Interface

MCP

Earliest failure stage

Native analysis or reconstruction

Relevant output or evidence

Root cause and fix are in #8882, with the regression tests.

Typed outcome or recovery expected

inspection: "capacity" for the AMDGPU object.

Analysis or suspected cause

The metadata decoder limits arrays and maps to 65,536 entries, but the preflight does not check that limit, so the decoder's rejection reaches the catch-all that reports malformed metadata. Fix in #8882.

Additional context

Fixed by #8882.

Originally created by @Adolanium on GitHub (Nov 4, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/8883 ### 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 Native analysis or decompilation ### Observed behavior `inspect_gpu_code_objects` reports an AMDGPU object as `inspection: "malformed"` when its metadata note is valid MessagePack holding an array of more than 65,536 elements or a map of more than 65,536 pairs. The same note with a 65,536-element array is inventoried normally. ### Reproduction Ran on Linux (WSL Ubuntu, Node 24.22.1) at upstream/main f042aaaf9 through MCP `inspect_gpu_code_objects` with `analysis: "inventory"`: an AMDGPU ELF whose note metadata adds `"amdhsa.extra"` as a 65,537-element array of `nil` (or a 65,537-pair map) returns the `amdgpu` object as `malformed`. ### Expected behavior The input is well formed and only exceeds the decoder's container limit, so the object is reported as `capacity`, like the other AMDGPU metadata budgets. ### Impact and scope An analyst is told the code object is corrupt when REA only declined to decode it within its limits. ### REA version revision `f042aaaf9` ### Runtime and platform Linux (WSL Ubuntu), Node 24.22.1 ### Target and artifact context Synthetic AMDGPU ELF test fixture. ### Interface MCP ### Earliest failure stage Native analysis or reconstruction ### Relevant output or evidence Root cause and fix are in #8882, with the regression tests. ### Typed outcome or recovery expected `inspection: "capacity"` for the AMDGPU object. ### Analysis or suspected cause The metadata decoder limits arrays and maps to 65,536 entries, but the preflight does not check that limit, so the decoder's rejection reaches the catch-all that reports malformed metadata. Fix in #8882. ### Additional context Fixed by #8882.
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#7781
No description provided.