2020 · Conference paper
P2IM: Scalable and Hardware-independent Firmware Testing via Automatic Peripheral Interface Modeling
P2IM emulates monolithic ARM Cortex-M firmware in a modified QEMU by classifying memory-mapped I/O registers as control-status, status, data or control-data during speculative execution runs and feeding fuzzer inputs through data registers and round-robin interrupts.
Scope and limitations
Scoped to processor-peripheral interfaces in monolithic ARM Cortex-M firmware without OS kernels; DMA, nuanced interrupt timing and external bus devices are outside its model, and it assumes firmware runs through peripheral abstraction layers (HAL/driver libraries). Misclassified registers, unmodeled hardware semantics or unsupported MCU layouts can stall booting or cause false crashes and hangs. Evaluating 70 sample programs and 10 real-world device firmwares establishes a fuzzing environment for fuzzing.
Why it fits this collection
Establishes access-pattern-based MMIO register classification for hardware-independent Cortex-M firmware rehosting, complementing library-matching rehosting in HALucinator and symbolic MMIO modeling in Fuzzware.
Cite
@inproceedings{paper-p2im,
title = {{P2IM: Scalable and Hardware-independent Firmware Testing via Automatic Peripheral Interface Modeling}},
author = {{Bo Feng} and {Alejandro Mera} and {Long Lu}},
year = {2020},
url = {https://www.usenix.org/conference/usenixsecurity20/presentation/feng},
booktitle = {29th USENIX Security Symposium (USENIX Security 20)},
pages = {1237--1254},
publisher = {USENIX Association},
eprint = {1909.06472},
archivePrefix = {arXiv},
month = aug
}
Read in a terminal: hf papers read 1909.06472
Publication and review details
- Venue
- USENIX Security 2020
- Status
- Conference paper
- Publication / posting date
- August 2020
- Date source
- The official USENIX Security 2020 proceedings page gives August 2020. Month precision is retained rather than treating the conference schedule as a publication day.
- First arXiv submission
- September 13, 2019
- arXiv
- 1909.06472
- Reviewed arXiv version
- v3
The sources are the 18-page USENIX Security 2020 proceedings PDF (pages 1237–1254) and arXiv 1909.06472v3 (submitted 2019-09-13, v3 dated 2020-06-15); the USENIX page lists no publisher DOI. The linked RiS3-Lab/p2im repository is licensed under GPL-2.0 at the root while tracking patched AFL, QEMU and unit_testing submodules separately. Its documentation targets 64-bit Ubuntu 16.04/18.04, GCC and the GNU Arm Embedded Toolchain, and requires manual fuzz.cfg setup (MCU model, ROM/RAM layout and interrupt interval) plus firmware-specific input instrumentation when applications read peripheral buffers indirectly.
Sources reviewed
Reviewed against the paper and its primary sources. Cite the original authors using the linked paper or BibTeX.
Primary sources
- https://www.usenix.org/conference/usenixsecurity20/presentation/feng
- https://www.usenix.org/system/files/sec20-feng.pdf
- https://arxiv.org/abs/1909.06472
- https://arxiv.org/abs/1909.06472v3
- https://arxiv.org/pdf/1909.06472v3.pdf
- README.md GitHub · RiS3-Lab/p2im · Revision 0e64506
- LICENSE GitHub · RiS3-Lab/p2im · Revision 0e64506
- .gitmodules GitHub · RiS3-Lab/p2im · Revision 0e64506
- docs/build_qemu.md GitHub · RiS3-Lab/p2im · Revision 0e64506
- docs/prep_fw_for_fuzzing.md GitHub · RiS3-Lab/p2im · Revision 0e64506
- fuzzing/templates/fuzz.cfg.template GitHub · RiS3-Lab/p2im · Revision 0e64506