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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

        Participants

        @evanrichter

        Issue actions

          Panic due to integer wrapping · Issue #72 · rafalh/rust-fatfs