CVE-2023-52804 fs/jfs: Add validity check for db_maxag and db_agpref

High 7.8 Published Updated

A missing validity check in the Linux kernel JFS filesystem allows out-of-bounds array access, potentially causing a system crash.

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-2023-52804?

CVE-2023-52804 is a high-severity vulnerability in Linux kernel, published on 21 May 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:

fs/jfs: Add validity check for db_maxag and db_agpref

Both db_maxag and db_agpref are used as the index of the db_agfree array, but there is currently no validity check for db_maxag and db_agpref, which can lead to errors.

The following is related bug reported by Syzbot:

UBSAN: array-index-out-of-bounds in fs/jfs/jfs_dmap.c:639:20 index 7936 is out of range for type 'atomic_t[128]'

Add checking that the values of db_maxag and db_agpref are valid indexes for the db_agfree array.

Weakness: CWE-129

Which versions are affected by CVE-2023-52804?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2023-52804?

Apply the vendor's patch.

Is CVE-2023-52804 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2023-52804, DEBIAN-CVE-2023-52804, GHSA-xhh8-8jq9-8vf6, UBUNTU-CVE-2023-52804.

Is CVE-2023-52804 in your software?

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

Check your SBOMs for free