jp2/opj_decompress.c in OpenJPEG through 2.3.1 has a use-after-free that can be triggered if there is a mix of valid and invalid files in a directory operated on by the decompressor. Triggering a double-free may also be possible. This is related to calling opj_image_destroy twice.
The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer.
Link | Tags |
---|---|
https://github.com/uclouvain/openjpeg/issues/1261 | third party advisory patch |
https://lists.debian.org/debian-lts-announce/2020/07/msg00008.html | third party advisory mailing list |
https://www.oracle.com/security-alerts/cpuoct2020.html | third party advisory |
https://pastebin.com/4sDKQ7U8 | third party advisory |
https://security.gentoo.org/glsa/202101-29 | third party advisory vendor advisory |
https://www.debian.org/security/2021/dsa-4882 | third party advisory vendor advisory |
https://www.oracle.com//security-alerts/cpujul2021.html | third party advisory |