LongSoft / UEFITool

UEFI firmware image viewer and editor
BSD 2-Clause "Simplified" License
4.47k stars 632 forks source link

Rewrite NVRAM parsers in KaitaiStruct #344

Open NikolajSchlej opened 1 year ago

NikolajSchlej commented 1 year ago

Fuzzing showed that the current NVRAM parser is prone to deadloops because of offset backtracking. Because data formats for all supported NVRAM types are fairly simple, I expect them to be expressible in declarative KaitaiStruct language.

Progress:

NikolajSchlej commented 1 year ago

A test file that breaks the current parser oom-da07474f9bcec134c8120957f419e6d6ed23c46a.zip

NikolajSchlej commented 1 year ago

TianoCore VSS: https://github.com/LongSoft/UEFITool/commit/318fdb7fa188a81db36939164f4e94190bc761a3