Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion failure in stbi__jpeg_huff_decode, stb_image.h:1894 #165

Open
waugustus opened this issue Apr 23, 2022 · 3 comments
Open

Assertion failure in stbi__jpeg_huff_decode, stb_image.h:1894 #165

waugustus opened this issue Apr 23, 2022 · 3 comments

Comments

@waugustus
Copy link

waugustus commented Apr 23, 2022

Description

There is an assertion failure error in stbi__jpeg_huff_decode, stb_image.h:1894. Remote attackers could leverage this vulnerability to cause a denial-of-service via a crafted jpg file.

Version

img2sixel 1.8.6, commit id 6a5be8b (Tue Jan 14 02:27:00 2020 +0900)

Reproduction

# img2sixel poc -o /tmp/foo
img2sixel: stb_image.h:1894: stbi__jpeg_huff_decode: Assertion `(((j->code_buffer) >> (32 - h->size[c])) & stbi__bmask[h->size[c]]) == h->code[c]' failed.
Aborted (core dumped)

poc.zip

Platfrom

# uname -a
Linux 4a409ce47130 5.4.0-70-generic #78~18.04.1-Ubuntu SMP Sat Mar 20 14:10:07 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
@carnil
Copy link

carnil commented May 12, 2022

Can you report the issue to the new upstream at https://github.com/libsixel/libsixel ?

@waugustus
Copy link
Author

Can you report the issue to the new upstream at https://github.com/libsixel/libsixel ?

OK, and thank you for your suggestion.

@waugustus
Copy link
Author

CVE-2022-29977 assigned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants