Skip to contentSkip to conversation

p54: validate firmware record lengths

PATCH Heyang Tan 1 participant 1 message Sep 19

lore
Share & tools
lore

Heyang Tan

author
#0 lore raw

Hi Christian,

Thanks for the PCI/USB testing and the review comments. I will simplify the component-ID length check and the component-version handling in the next revision.

Could you also help with one focused parser-only validation on Linux, if convenient? The goal is to distinguish the malformed-record boundary from the normal firmware compatibility testing:

1. Run the private truncated-descriptor fixture through the unpatched parser under a KASAN-enabled kernel (a small KUnit/test-module harness is fine; physical p54 hardware should not be required).
2. Record whether KASAN reports a read beyond the allocated firmware buffer (fw->data + fw->size), rather than merely crossing into a following record.
3. Run the same fixture with the revised patch and confirm it returns -EINVAL without a KASAN report.

Fixture SHA-256:
8dc5f14057d46ae0a08f2406d0119991c645365d2dcf8c71c6f5de6fe0f8ad53

This is a private derived parser-boundary fixture, not an official linux-firmware image. I am not claiming a CVE or a completed dynamic reproduction until this comparison is available. If the harness is too much work, a brief statement that the test cannot be run is also useful.

Regards,
Heyang Tan