CVE-2023-52458 block: add check that partition length needs to be aligned with block size

Medium 5.5 Published Updated

A missing alignment check in the Linux kernel block layer can cause a null pointer dereference and IO errors when reading the last sector of a partition on disks with large logical block sizes.

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-52458?

CVE-2023-52458 is a medium-severity vulnerability in Linux kernel, published on 23 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:

block: add check that partition length needs to be aligned with block size

Before calling add partition or resize partition, there is no check on whether the length is aligned with the logical block size. If the logical block size of the disk is larger than 512 bytes, then the partition size maybe not the multiple of the logical block size, and when the last sector is read, bio_truncate() will adjust the bio size, resulting in an IO error if the size of the read command is smaller than the logical block size.If integrity data is supported, this will also result in a null pointer dereference when calling bio_integrity_free.

Weakness: CWE-476

Which versions are affected by CVE-2023-52458?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2023-52458?

Apply the vendor's patch.

Is CVE-2023-52458 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2023-52458, DEBIAN-CVE-2023-52458, GHSA-w4r8-q3v5-4x28, UBUNTU-CVE-2023-52458.

Is CVE-2023-52458 in your software?

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

Check your SBOMs for free