Skip to content

Panic due to integer wrapping #72

@evanrichter

Description

@evanrichter

The attached img file will cause the following subtraction to overflow:

let bytes_left_in_cluster = (cluster_size - offset_in_cluster) as usize;

img.zip

The application code can be seen here: https://github.com/evanrichter/rust-fatfs/blob/16f52f4d64c6d54ca9290f66e5167e1f2ddad552/fuzz/fuzz_targets/fs_load.rs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions