Currently invalid bitcode files can cause a crash, when OpNum exceeds
the number of elements in Record, like in the attached bitcode file.
The test case was generated by clusterfuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=15698
Differential D64507
[BitcodeReader] Validate OpNum, before accessing Record array. fhahn on Jul 10 2019, 9:19 AM. Authored by
Details Currently invalid bitcode files can cause a crash, when OpNum exceeds The test case was generated by clusterfuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=15698
Diff Detail
Event Timeline
Comment Actions I've reverted the patch, because the bitcode file caused an out-of-memory error on a builder. I think there is another problem with the bitcode file, which causes large allocations. I've seen something similar in other cases generated by cluster fuzz, which set the number of variables or something in the header to a very large number, causing large up-front allocations for an invalid file. I'll take a look. |