CVE-2023-53320 scsi: mpi3mr: Fix issues in mpi3mr_get_all_tgt_info()

High 7.8 Published Updated

A memory corruption flaw in the mpi3mr SCSI driver allows attackers to trigger a slab-out-of-bounds write, causing a kernel crash and denial of service.

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

CVE-2023-53320 is a high-severity memory corruption vulnerability in Linux kernel, published on 16 Sep 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:

scsi: mpi3mr: Fix issues in mpi3mr_get_all_tgt_info()

The function mpi3mr_get_all_tgt_info() has four issues:

1) It calculates valid entry length in alltgt_info assuming the header part of the struct mpi3mr_device_map_info would equal to sizeof(u32). The correct size is sizeof(u64).

2) When it calculates the valid entry length kern_entrylen, it excludes one entry by subtracting 1 from num_devices.

3) It copies num_device by calling memcpy(). Substitution is enough.

4) It does not specify the calculated length to sg_copy_from_buffer(). Instead, it specifies the payload length which is larger than the alltgt_info size. It causes "BUG: KASAN: slab-out-of-bounds".

Fix the issues by using the correct header size, removing the subtraction from num_devices, replacing the memcpy() with substitution and specifying the correct length to sg_copy_from_buffer().

Weakness: CWE-787

Which versions are affected by CVE-2023-53320?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2023-53320?

Apply the vendor's patch.

Upgrade to the fixed version. Memory-safe languages, compiler hardening and fuzzing prevent most new cases. More about Memory corruption.

Is CVE-2023-53320 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2023-53320, DEBIAN-CVE-2023-53320, GHSA-6j5m-wpm9-j86c, ROOT-OS-UBUNTU-2204-CVE-2023-53320, UBUNTU-CVE-2023-53320.

Is CVE-2023-53320 in your software?

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

Check your SBOMs for free