CVE-2023-52749 spi: Fix null dereference on suspend

Medium 4.7 Published Updated

A race condition in the Linux kernel SPI subsystem causes a null pointer dereference during system suspend, leading to a 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-52749?

CVE-2023-52749 is a medium-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:

spi: Fix null dereference on suspend

A race condition exists where a synchronous (noqueue) transfer can be active during a system suspend. This can cause a null pointer dereference exception to occur when the system resumes.

Example order of events leading to the exception: 1. spi_sync() calls __spi_transfer_message_noqueue() which sets ctlr->cur_msg 2. Spi transfer begins via spi_transfer_one_message() 3. System is suspended interrupting the transfer context 4. System is resumed 6. spi_controller_resume() calls spi_start_queue() which resets cur_msg to NULL 7. Spi transfer context resumes and spi_finalize_current_message() is called which dereferences cur_msg (which is now NULL)

Wait for synchronous transfers to complete before suspending by acquiring the bus mutex and setting/checking a suspend flag.

Weakness: CWE-476, CWE-362

Which versions are affected by CVE-2023-52749?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2023-52749?

Apply the vendor's patch.

Is CVE-2023-52749 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as AZL-54821, BELL-CVE-2023-52749, DEBIAN-CVE-2023-52749, GHSA-qm6m-jh59-wxwp, ROOT-OS-UBUNTU-2204-CVE-2023-52749, UBUNTU-CVE-2023-52749.

Is CVE-2023-52749 in your software?

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

Check your SBOMs for free