Skip to content

EDGEML-15209: relax xclbin m_length check to tolerate legacy files - #10136

Merged
stsoe merged 1 commit into
Xilinx:mcdm_m1.0from
stsoe:cp_10135
Oct 23, 2026
Merged

stsoe merged 1 commit into
Xilinx:mcdm_m1.0from
stsoe:cp_10135

Conversation

@stsoe

@stsoe stsoe commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

Accept xclbins where m_header.m_length does not exactly match the buffer size; only reject when the buffer is smaller than m_length declares, which would risk out-of-bounds access. Downstream bounds checks (section header array and per-section offset/size) use the actual buffer size and remain the true safety net.

(cherry picked from commit 5b9429e)

Accept xclbins where m_header.m_length does not exactly match the
buffer size; only reject when the buffer is smaller than m_length
declares, which would risk out-of-bounds access.  Downstream bounds
checks (section header array and per-section offset/size) use the
actual buffer size and remain the true safety net.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Soren Soe <2106410+stsoe@users.noreply.github.com>
(cherry picked from commit 5b9429e)
@stsoe
stsoe merged commit f326ee2 into Xilinx:mcdm_m1.0 Oct 23, 2026
7 of 17 checks passed
stsoe added a commit to stsoe/XRT that referenced this pull request Oct 23, 2026
…ilinx#10136)

Accept xclbins where m_header.m_length does not exactly match the
buffer size; warn when the buffer is smaller than m_length declares.
Downstream bounds checks (section header array and per-section
offset/size) use the actual buffer size and remain the true safety
net.

(cherry picked from commit 5b9429e)

Signed-off-by: Soren Soe <2106410+stsoe@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant