Skip to content

Segfault when loading arbitrary file as mmproj or model #1505

@joeyhub

Description

@joeyhub

Unfortunately I don't have time at present to fully report this but would like someone else to pick it up. When I download the binary for windows with cuda then run llama-mtmd-cli.exe on an invalid mmproj and model it Segfaults. This happened when I right clicked and did download file where it's not actually the file but the HTML of the next page for each.

I would suggest that someone check this and reproduce it, perhaps make it a test case just to see what happens loading random invalid files as it likely would make it easier for a malicious model file loaded to gain more access than it should have. I suspect in many cases the seg faults (invalid memory access) could be easily fixed.

I can't look to see if the segfault is problematic or not but it could also mean a corrupt model might have issues with memory corruption or unexpected behavior. If you haven't been putting in random files for testing, just piping in random or something, you might have missed a useful tool that'll find a bunch of bugs for you. If there is a lack of checking then some issues might be silent only getting lucky to see a segfault. The silent ones are more likely to pass through when someone is managing a model, testing it before release.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions