Skip to content

Failed-Assertion-in jasper(version 3.0.6, commit 66632500) #345

Closed

Description

@benehalo

Crash Inputs

Here are the files that trigger the bug - jas_image.c_1010.zip

Bug Description

I apply debug mode (-g -O0) to check for errors and report the detected errors as follows.

jasper: /data/code/jasper/src/libjasper/base/jas_image.c:1010: uint_fast32_t inttobits(jas_seqent_t, unsigned int, _Bool): Assertion `v >= 0 || sgnd' failed.

How to Reproduce

The aforementioned bug can be stably reproduced in version 3.0.6 (commit id 6663250).

  1. Download the jasper source code with the [official link](https://github.com/mdadams/jasper).
  2. Using clang/clang++ (10.0.0-4ubuntu1), build jasper with debug mode.
    • -g -O0
  3. Execute jasper with the provided input files.
    • eg: /data/program/jasper/test/bin/jasper --input <input-file-path> --output /tmp/test.bmp --output-format bmp

Activity

  1. jubalh commented on Oct 11, 2022

    @jubalh
    Member

    You have 5 files in the zip file, each of them triggers the same response, yes?

  2. benehalo commented on Oct 12, 2022

    @benehalo
    Author

    You have 5 files in the zip file, each of them triggers the same response, yes?

    Yes, each of the input files triggers the same reponse.

  3. jubalh commented on Oct 12, 2022

    @jubalh
    Member

    Thanks for confirming.

  4. AHMorinaga commented on Dec 1, 2022

    @AHMorinaga

    What is the range of Jasper versions that contain this vulnerability?

  5. jubalh commented on Dec 1, 2022

    @jubalh
    Member

    You'll have to check that yourself unfortunately.
    3.0.6 is vulnerable and 4.0.0 is the first version with the fix.

  6. added a commit that references this issue on Sep 14, 2024
    34faad5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions