CVE-2024-26590 erofs: fix inconsistent per-file compression format

Medium 5.5 Published Updated

A crafted EROFS image can trigger a kernel NULL pointer dereference, causing a denial of service in the Linux kernel.

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-2024-26590?

CVE-2024-26590 is a medium-severity vulnerability in Linux kernel, published on 22 Feb 2024. 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:

erofs: fix inconsistent per-file compression format

EROFS can select compression algorithms on a per-file basis, and each per-file compression algorithm needs to be marked in the on-disk superblock for initialization.

However, syzkaller can generate inconsistent crafted images that use an unsupported algorithmtype for specific inodes, e.g. use MicroLZMA algorithmtype even it's not set in `sbi->available_compr_algs`. This can lead to an unexpected "BUG: kernel NULL pointer dereference" if the corresponding decompressor isn't built-in.

Fix this by checking against `sbi->available_compr_algs` for each m_algorithmformat request. Incorrect !erofs_sb_has_compr_cfgs preset bitmap is now fixed together since it was harmless previously.

Weakness: CWE-476

Which versions are affected by CVE-2024-26590?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-26590?

Apply the vendor's patch.

Is CVE-2024-26590 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2024-26590, DEBIAN-CVE-2024-26590, GHSA-3j4f-wx4w-q2cq, UBUNTU-CVE-2024-26590.

Is CVE-2024-26590 in your software?

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

Check your SBOMs for free