CVE-2023-52457 serial: 8250: omap: Don't skip resource freeing if pm_runtime_resume_and_get() failed

High 7.8 Published Updated

A use-after-free vulnerability in the Linux kernel's 8250 OMAP serial driver allows attackers to potentially execute code or cause 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-52457?

CVE-2023-52457 is a high-severity use after free 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:

serial: 8250: omap: Don't skip resource freeing if pm_runtime_resume_and_get() failed

Returning an error code from .remove() makes the driver core emit the little helpful error message:

remove callback returned a non-zero value. This will be ignored.

and then remove the device anyhow. So all resources that were not freed are leaked in this case. Skipping serial8250_unregister_port() has the potential to keep enough of the UART around to trigger a use-after-free.

So replace the error return (and with it the little helpful error message) by a more useful error message and continue to cleanup.

Weakness: CWE-416

Which versions are affected by CVE-2023-52457?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2023-52457?

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-52457 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2023-52457, DEBIAN-CVE-2023-52457, GHSA-9xmv-37c3-q98h, UBUNTU-CVE-2023-52457.

Is CVE-2023-52457 in your software?

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

Check your SBOMs for free