Skip to content

Fix: Potential Vulnerability in Cloned Function#3058

Merged
davisking merged 1 commit intodavisking:masterfrom
tabudz:fix-CVE-2018-11212
Feb 27, 2025
Merged

Fix: Potential Vulnerability in Cloned Function#3058
davisking merged 1 commit intodavisking:masterfrom
tabudz:fix-CVE-2018-11212

Conversation

@tabudz
Copy link
Contributor

@tabudz tabudz commented Feb 24, 2025

Description
This PR fixes a security vulnerability in start_input_tga() that was cloned from libjpeg-turbo but did not receive the security patch. The original issue was reported and fixed under libjpeg-turbo/libjpeg-turbo@82923eb.
This PR applies the same patch to eliminate the vulnerability.

References
https://nvd.nist.gov/vuln/detail/CVE-2018-11212
libjpeg-turbo/libjpeg-turbo@82923eb

Throw an error when image width or height is 0.

Fixes mozilla/mozjpeg#140, closes davisking#7.
@davisking
Copy link
Owner

Nice, thanks for the fix.

@davisking davisking merged commit 8dab9c3 into davisking:master Feb 27, 2025
10 checks passed
@tabudz
Copy link
Contributor Author

tabudz commented Feb 27, 2025

Hi @davisking, thanks for merging my PR. Just want to let you know that I plan to report this as a CVE. Let me know if you have any concern!

davisking pushed a commit to kSkip/dlib that referenced this pull request Apr 19, 2025
Throw an error when image width or height is 0.

Fixes mozilla/mozjpeg#140, closes davisking#7.
@DragonL641
Copy link

What is the point of this bug fix, in Line 365, the size of image is already checked before the changed line?

@davisking
Copy link
Owner

Heh yeah, I just verified that the same patch was in the upstream repo. But that's a slightly different version of the code and it's not needed here. No worries though.

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

Successfully merging this pull request may close these issues.

3 participants