Repository navigation
Fuzz fixes - #407
Draft
JohnAZoidberg wants to merge 2 commits into
Draft
Fuzz fixes#407JohnAZoidberg wants to merge 2 commits into
JohnAZoidberg wants to merge 2 commits into
Conversation
read_memory() returns None if the platform isn't detected as Framework or the driver fails, but many callers unwrapped it. power_info() and get_accel_data() are also used by the UEFI app embedded in the BIOS, where a panic stops the boot. - read_u32/read_string return Option, add read_u8, and power_info() returns None if any read fails - get_accel_data() reads the whole block at once and returns zeros and an unreliable lid angle if that fails - AccelData::from doesn't index past short data - print_sensors() doesn't index past the sensor locations the EC reported - get_fan_num() returns an error instead of panicking
The EC sends 0xFF as board ID if it fails to read the ADC (BOARD_VERSION_UNKNOWN). Any value we don't know would panic, which in the UEFI app embedded in the BIOS stops the boot. Slots can hold modules with board IDs we don't recognize, so map those to InputModuleType::Unknown(u8). An unknown module has size 0 and an unknown touchpad is treated as not present. The deck state is an EC state machine value, an unknown one is an error. Decode it with TryFrom and return an EcError from get_input_deck_status/set_input_deck_mode instead of panicking. --inputdeck-mode prints that error instead of unwrapping it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.