Skip to content

Instantly share code, notes, and snippets.

Fuzzing

Fuzz testing is a useful technique to detect bugs in unexpected input that may cause errors when processing.

This document aggregates previous notes. While it's not intended to be an exhaustive set of instructions for all cases, it documents what can and has been done with the fuzzing harnesses so far.

Brief notes on platform setup

AFL setup

GSoC 2022 projects

S3 resume implementation

Overview

I successfully implemented firmware support for resume from S3 sleep on MinPlatform, mentored by Nate DeSimone and Ankit Sinha. It suspends from and resumes to an operating system on my Acer Aspire VN7-572G (Skylake). While presently, the board-specific code is only implemented for KabylakeOpenBoardPkg, I've attempted to ensure that the implementation is as silicon-agnostic as possible. After one last straightforward bug is resolved (involving conditions for detecting the power state), it will be entirely ready for daily use. I performed my testing with Fedora 34, with no relevant modifications.

Although for other platforms, it's expected that more work is required than toggling the S3 feature PCD - and developers may need to prepare for debugging their port of the KabylakeOpenBoardPkg commit - this should be quite straightforward. Therefore, I maintain that the implementation is almost entirely generic across at least all Intel client MinPlatform

@benjamindoron
benjamindoron / custom.json
Last active August 31, 2021 18:17
Reversed UEFI GUIDs - Acer Aspire VN7-572G
{
"gCNVS_ServiceProtocolGuid": [ 3724792528, 33510, 18964, 132, 48, 191, 27, 230, 103, 181, 204 ],
"gCommonServiceProtocolGuid": [ 1447303497, 8804, 17216, 174, 147, 210, 98, 18, 97, 102, 86 ],
"gRtKbcProtocolGuid": [ 839695866, 28932, 17923, 187, 31, 37, 179, 175, 181, 65, 146 ],
"gSmmKbcProtocolGuid": [ 3995062005, 18478, 17439, 173, 23, 84, 230, 96, 165, 148, 12 ]
}
@benjamindoron
benjamindoron / guid_converter_base10.py
Last active March 4, 2022 17:22
Convert UEFI_RETool's update_edk2_guids.py output (Python) into efiXplorer's guids.json
#!/bin/env python
import os
import re
import sys
compliance_test = re.compile(r"^\t\"[\w\d]+\": \[ [\d, ]+\],$")
# TODO: Consider offering to parse a directory of inputs

GSoC 2021 project - MinPlatform board port

Acer Aspire VN7-572G

Overview

I successfully ported MinPlatform to the specified Acer Skylake platform. It boots an operating system successfully, with some additional platform features enabled. In general, the port as-is could be suitable for daily use, with some caveats relating to security and platform/board feature enablement. I use and performed my testing with Fedora 34, with no relevant modifications.

This board was a good candidate for the project because it has Boot Guard disabled (but it's also the only x86 system that I own, so it's the only board I could choose). While I wasn't aware of this when I purchased this laptop, those planning/willing to port open-source firmware to their boards should know that this is important. Better yet, if the Management Engine is unfused (still in manufacturing mode), users may be able to take advantage of these fe