Files
yara/tests/data/undersized_rich
T
jmestwa-coder 690b3d0fda guard against undersized rich header in pe_parse_rich_signature (#2200)
When the backward scan in pe_parse_rich_signature finds a DanS marker only one to three dwords ahead of the Rich marker, rich_len ends up smaller than RICH_SIGNATURE. The unsigned subtraction rich_len - sizeof(RICH_SIGNATURE) then wraps and rich_count becomes a huge bogus value that drives the version_data allocation and copy loop. _rich_version already rejects rich_length < sizeof(RICH_SIGNATURE) for the same computation, so apply the same check before computing rich_count here.
2026-06-01 12:34:37 +02:00

392 B