Skip to content

zynqmp: Fix null pHT segfault verifying partition-only images#51

Open
bradfa wants to merge 1 commit into
Xilinx:masterfrom
bradfa:master-partition-only-segfault
Open

zynqmp: Fix null pHT segfault verifying partition-only images#51
bradfa wants to merge 1 commit into
Xilinx:masterfrom
bradfa:master-partition-only-segfault

Conversation

@bradfa

@bradfa bradfa commented Jul 6, 2026

Copy link
Copy Markdown

VerifyHeaderTableSignature() segfaulted on images with no bootloader partition (boot header sourceOffset == 0), such as a standalone signed FIT/Linux partition. That branch computed the signed header-block size from the pHT member, but ReadHeaderTableDetails() release()s each partition-header-table into the pHTs list, leaving pHT null. Normal bootloader images take the sourceOffset != 0 branch and never hit this, which is why it only showed up on partition-only images.

VerifyHeaderTableSignature() segfaulted on images with no bootloader
partition (boot header sourceOffset == 0), such as a standalone signed
FIT/Linux partition. That branch computed the signed header-block size
from the pHT member, but ReadHeaderTableDetails() release()s each
partition-header-table into the pHTs list, leaving pHT null. Normal
bootloader images take the sourceOffset != 0 branch and never hit
this, which is why it only showed up on partition-only images.

Signed-off-by: Andrew Bradford <andrew.bradford@konsulko.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