CVE-2022-1122 Use after free in openjpeg2
An attacker can cause a denial of service in the opj2_decompress program by providing a directory with many files, triggering a crash via an uninitialized pointer free.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2022-1122?
CVE-2022-1122 is a medium-severity use after free vulnerability in Debian Debian Linux, published on 29 Mar 2022. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Official description
A flaw was found in the opj2_decompress program in openjpeg2 2.4.0 in the way it handles an input directory with a large number of files. When it fails to allocate a buffer to store the filenames of the input directory, it calls free() on an uninitialized pointer, leading to a segmentation fault and a denial of service.
Which versions are affected by CVE-2022-1122?
It affects 3 products.
Linux distribution packages (29)
openjpeg2 AlmaLinux:8 | All versions | 2.4.0-5.el8 |
openjpeg2-devel AlmaLinux:8 | All versions | 2.4.0-5.el8 |
openjpeg2-devel-docs AlmaLinux:8 | All versions | 2.4.0-5.el8 |
openjpeg2-tools AlmaLinux:8 | All versions | 2.4.0-5.el8 |
openjpeg2 AlmaLinux:9 | All versions | 2.4.0-7.el9 |
openjpeg2-devel AlmaLinux:9 | All versions | 2.4.0-7.el9 |
openjpeg2-tools AlmaLinux:9 | All versions | 2.4.0-7.el9 |
openjpeg2 Red Hat:enterprise_linux:8::appstream | All versions | 0:2.4.0-5.el8 |
openjpeg2-debuginfo Red Hat:enterprise_linux:8::appstream | All versions | 0:2.4.0-5.el8 |
openjpeg2-debugsource Red Hat:enterprise_linux:8::appstream | All versions | 0:2.4.0-5.el8 |
openjpeg2-devel-docs Red Hat:enterprise_linux:8::appstream | All versions | 0:2.4.0-5.el8 |
openjpeg2-tools Red Hat:enterprise_linux:8::appstream | All versions | 0:2.4.0-5.el8 |
openjpeg2-tools-debuginfo Red Hat:enterprise_linux:8::appstream | All versions | 0:2.4.0-5.el8 |
openjpeg2-debuginfo Red Hat:enterprise_linux:8::crb | All versions | 0:2.4.0-5.el8 |
openjpeg2-debugsource Red Hat:enterprise_linux:8::crb | All versions | 0:2.4.0-5.el8 |
openjpeg2-devel Red Hat:enterprise_linux:8::crb | All versions | 0:2.4.0-5.el8 |
openjpeg2-tools Red Hat:enterprise_linux:8::crb | All versions | 0:2.4.0-5.el8 |
openjpeg2-tools-debuginfo Red Hat:enterprise_linux:8::crb | All versions | 0:2.4.0-5.el8 |
openjpeg2 Red Hat:enterprise_linux:9::appstream | All versions | 0:2.4.0-7.el9 |
openjpeg2-debuginfo Red Hat:enterprise_linux:9::appstream | All versions | 0:2.4.0-7.el9 |
openjpeg2-debugsource Red Hat:enterprise_linux:9::appstream | All versions | 0:2.4.0-7.el9 |
openjpeg2-tools-debuginfo Red Hat:enterprise_linux:9::appstream | All versions | 0:2.4.0-7.el9 |
openjpeg2-debuginfo Red Hat:enterprise_linux:9::crb | All versions | 0:2.4.0-7.el9 |
openjpeg2-debugsource Red Hat:enterprise_linux:9::crb | All versions | 0:2.4.0-7.el9 |
openjpeg2-devel Red Hat:enterprise_linux:9::crb | All versions | 0:2.4.0-7.el9 |
openjpeg2-tools Red Hat:enterprise_linux:9::crb | All versions | 0:2.4.0-7.el9 |
openjpeg2-tools-debuginfo Red Hat:enterprise_linux:9::crb | All versions | 0:2.4.0-7.el9 |
openjpeg2 Rocky Linux:8 | All versions | 0:2.4.0-5.el8 |
openjpeg2 Rocky Linux:9 | All versions | 0:2.4.0-7.el9 |
Products include Debian Debian Linux, Fedoraproject Fedora, Uclouvain Openjpeg.
How do I fix CVE-2022-1122?
Apply the vendor's patch.
Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.
Is CVE-2022-1122 being exploited?
There is no known exploitation of CVE-2022-1122 in the wild and no public exploit code.
Other vulnerabilities in Debian Debian Linux
Sources
Also known as ALPINE-CVE-2022-1122, ALSA-2022:7645, ALSA-2022:8207, AZL-45240, DEBIAN-CVE-2022-1122, GHSA-4x8v-rchj-qvpf and 8 more.