-
Notifications
You must be signed in to change notification settings - Fork 190
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
Heap Buffer Overflow in smooth2() in cmsgamma.c #475
Comments
Please submit source code of the caller program. |
Thank you for comment.
Thanks for any follow-up advice! |
Thanks, this is not exploitable as this function is never called on normal color management, is there only as a helper for low-level programming and investigation. However, I am adding a code guard for the very unlikely mistake of somebody trying to smooth a table of only one element. |
Added a check for trying to smooth tables with less that 4 elements or by using lambda value close to zero.
Description
A heap buffer overflow vulnerability has been identified in the
smooth2()
incmsgamma.c
in lcms2-2.16. The vulnerability occurs due to numerical instability in the calculation of array elements, which can lead to out-of-bounds memory access.Result of ASAN:
Affected Version
lcms2-2.16
POC
Poc-smooth2.zip
You can reproduce the vulnerability with:
./harness input
Analysis
The vulnerability is triggered in the following code sequence:
Little-CMS/src/cmsgamma.c
Lines 1173 to 1174 in 453bafe
The issue arises when:
d[2]
results in a value very close to zero or zero itselfc[2]
c[2]
The text was updated successfully, but these errors were encountered: