HomePhabricator

[BitcodeReader] Validate OpNum, before accessing Record array.

Authored by fhahn on Jul 11 2019, 2:57 AM.

Description

[BitcodeReader] Validate OpNum, before accessing Record array.

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

Reviewers: t.p.northover, thegameg, jfb

Reviewed By: jfb

Differential Revision: https://reviews.llvm.org/D64507

llvm-svn: 365750

Details

Committed
fhahnJul 11 2019, 2:57 AM
Reviewer
jfb
Differential Revision
D64507: [BitcodeReader] Validate OpNum, before accessing Record array.
Parents
rG08b4a8da07aa: [ARM][LowOverheadLoops] Correct offset checking
Branches
Unknown
Tags
Unknown