Fix Linux flavor check to match RedHat or Centos - #129
Merged
Conversation
Packages were not created on RHEL.
|
Build Failed! :( |
|
Build Failed! :( |
stsoe
added a commit
to stsoe/XRT
that referenced
this pull request
Aug 5, 2026
Fix CodeQL alerts per Jira tickets - AIESW-41130 - AIESW-41131 - AIESW-41132 - AIESW-41133 - AIESW-41134 - AIESW-41135 Six CWE-125 heap OOB read vulnerabilities in xclbin_parser.cpp where attacker-controlled mpo (string offset) fields from SOFT_KERNEL and AIE_PARTITION sections were used as pointer offsets without bounds checking. CodeQL alerts Xilinx#129–Xilinx#134 (amd-psirt/xclbin-parser-oob, HIGH severity). The SOFT_KERNEL issues were never previously addressed. The aie_partition::mpo_name and cdo_group::mpo_name issues were missed by the prior fix in b5c8a09 (SWSPLAT-24066), which validated array/struct offsets but not bare string offsets. Added validate_string_offset() helper that checks an mpo uint32_t offset is strictly less than the section buffer size before pointer arithmetic. Applied at all six flagged sites: - get_softkernels(): also adds section bounds and sizeof(soft_kernel) header checks before any field access - get_aie_partition(): validates aiep->mpo_name and cdop->mpo_name Low. Validation only at load time; rejects malformed xclbins that would previously cause OOB reads. Built xrt_coreutil successfully. Requires fuzzing with crafted xclbins and AddressSanitizer validation to fully exercise the new checks. None Signed-off-by: Soren Soe <2106410+stsoe@users.noreply.github.com> Co-Authored-By: Claude <noreply@anthropic.com>
chvamshi-xilinx
pushed a commit
that referenced
this pull request
Aug 6, 2026
* CodeQL Fix xclbin parser mpo string offset OOB reads Fix CodeQL alerts per Jira tickets - AIESW-41130 - AIESW-41131 - AIESW-41132 - AIESW-41133 - AIESW-41134 - AIESW-41135 Six CWE-125 heap OOB read vulnerabilities in xclbin_parser.cpp where attacker-controlled mpo (string offset) fields from SOFT_KERNEL and AIE_PARTITION sections were used as pointer offsets without bounds checking. CodeQL alerts #129–#134 (amd-psirt/xclbin-parser-oob, HIGH severity). The SOFT_KERNEL issues were never previously addressed. The aie_partition::mpo_name and cdo_group::mpo_name issues were missed by the prior fix in b5c8a09 (SWSPLAT-24066), which validated array/struct offsets but not bare string offsets. Added validate_string_offset() helper that checks an mpo uint32_t offset is strictly less than the section buffer size before pointer arithmetic. Applied at all six flagged sites: - get_softkernels(): also adds section bounds and sizeof(soft_kernel) header checks before any field access - get_aie_partition(): validates aiep->mpo_name and cdop->mpo_name Low. Validation only at load time; rejects malformed xclbins that would previously cause OOB reads. Built xrt_coreutil successfully. Requires fuzzing with crafted xclbins and AddressSanitizer validation to fully exercise the new checks. None Signed-off-by: Soren Soe <2106410+stsoe@users.noreply.github.com> Co-Authored-By: Claude <noreply@anthropic.com> * Early exit for easier reading Signed-off-by: Soren Soe <2106410+stsoe@users.noreply.github.com> --------- Signed-off-by: Soren Soe <2106410+stsoe@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Packages were not created on RHEL.