CVE-2023-52515 RDMA/srp: Do not call scsi_done() from srp_abort()

Critical 9.8 Published Updated

A use-after-free vulnerability in the Linux kernel's RDMA/SRP driver allows attackers to potentially execute code or cause a system crash.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2023-52515?

CVE-2023-52515 is a critical use after free vulnerability in Linux kernel, published on 2 Mar 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

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

RDMA/srp: Do not call scsi_done() from srp_abort()

After scmd_eh_abort_handler() has called the SCSI LLD eh_abort_handler callback, it performs one of the following actions: * Call scsi_queue_insert(). * Call scsi_finish_command(). * Call scsi_eh_scmd_add(). Hence, SCSI abort handlers must not call scsi_done(). Otherwise all the above actions would trigger a use-after-free. Hence remove the scsi_done() call from srp_abort(). Keep the srp_free_req() call before returning SUCCESS because we may not see the command again if SUCCESS is returned.

Weakness: CWE-416

Which versions are affected by CVE-2023-52515?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2023-52515?

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-2023-52515 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2023-52515, DEBIAN-CVE-2023-52515, GHSA-9mhh-v2w9-x3xj, UBUNTU-CVE-2023-52515.

Is CVE-2023-52515 in your software?

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

Check your SBOMs for free