CVE-2023-52473 thermal: core: Fix NULL pointer dereference in zone registration error path

Medium 5.5 Published Updated

A NULL pointer dereference in the Linux kernel thermal subsystem allows local attackers to cause a system crash via error path handling.

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

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

thermal: core: Fix NULL pointer dereference in zone registration error path

If device_register() in thermal_zone_device_register_with_trips() returns an error, the tz variable is set to NULL and subsequently dereferenced in kfree(tz->tzp).

Commit adc8749b150c ("thermal/drivers/core: Use put_device() if device_register() fails") added the tz = NULL assignment in question to avoid a possible double-free after dropping the reference to the zone device. However, after commit 4649620d9404 ("thermal: core: Make thermal_zone_device_unregister() return after freeing the zone"), that assignment has become redundant, because dropping the reference to the zone device does not cause the zone object to be freed any more.

Drop it to address the NULL pointer dereference.

Weakness: CWE-476

Which versions are affected by CVE-2023-52473?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2023-52473?

Apply the vendor's patch.

Is CVE-2023-52473 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2023-52473, DEBIAN-CVE-2023-52473, GHSA-4473-972q-596c, UBUNTU-CVE-2023-52473.

Is CVE-2023-52473 in your software?

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

Check your SBOMs for free