CVE-2022-49078 lz4: fix LZ4_decompress_safe_partial read out of bound

High 7.8 Published Updated

A use-after-free vulnerability in the Linux kernel's LZ4 decompression allows attackers to cause denial of service or potentially execute code via corrupted data.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2022-49078?

CVE-2022-49078 is a high-severity use after free vulnerability in Linux kernel, published on 26 Feb 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

In the Linux kernel, the following vulnerability has been resolved:

lz4: fix LZ4_decompress_safe_partial read out of bound

When partialDecoding, it is EOF if we've either filled the output buffer or can't proceed with reading an offset for following match.

In some extreme corner cases when compressed data is suitably corrupted, UAF will occur. As reported by KASAN [1], LZ4_decompress_safe_partial may lead to read out of bound problem during decoding. lz4 upstream has fixed it [2] and this issue has been disscussed here [3] before.

current decompression routine was ported from lz4 v1.8.3, bumping lib/lz4 to v1.9.+ is certainly a huge work to be done later, so, we'd better fix it first.

[1] https://lore.kernel.org/all/[email protected]/ [2] https://github.com/lz4/lz4/commit/c5d6f8a8be3927c0bec91bcc58667a6cfad244ad# [3] https://lore.kernel.org/all/[email protected]/

Weakness: CWE-416

Which versions are affected by CVE-2022-49078?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2022-49078?

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-49078 being exploited?

There is no known exploitation of CVE-2022-49078 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2022-49078, GHSA-jh3f-g934-rw77, UBUNTU-CVE-2022-49078.

Is CVE-2022-49078 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free