A wasm file crafted with a bogus section size can trigger an ASan issue
in the DWARFObjInMemory constructor. Nip the problem in the bud when we
read the wasm section.
Found by OSS-Fuzz:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3219
Differential D38777
[wasm] readSection: Avoid reading past eof (fixes oss-fuzz #3219) vsk on Oct 10 2017, 6:58 PM. Authored by
Details A wasm file crafted with a bogus section size can trigger an ASan issue Found by OSS-Fuzz:
Diff Detail Event Timeline
Comment Actions
|
Perhaps do this before the ArrayRef is created and before Ptr is incremented?
if (Ptr + Size > Eof)