CVE-2024-57978 media: imx-jpeg: Fix potential error pointer dereference in detach_pm()

Medium 5.5 Published Updated

A null pointer dereference in the imx-jpeg driver can cause a kernel Oops, leading to 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-2024-57978?

CVE-2024-57978 is a medium-severity vulnerability in Linux kernel, published on 27 Feb 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:

media: imx-jpeg: Fix potential error pointer dereference in detach_pm()

The proble is on the first line:

if (jpeg->pd_dev[i] && !pm_runtime_suspended(jpeg->pd_dev[i]))

If jpeg->pd_dev[i] is an error pointer, then passing it to pm_runtime_suspended() will lead to an Oops. The other conditions check for both error pointers and NULL, but it would be more clear to use the IS_ERR_OR_NULL() check for that.

Weakness: CWE-476

Which versions are affected by CVE-2024-57978?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2024-57978?

Apply the vendor's patch.

Is CVE-2024-57978 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as AZL-58033, BELL-CVE-2024-57978, DEBIAN-CVE-2024-57978, GHSA-j6gc-v552-cf9v, UBUNTU-CVE-2024-57978.

Is CVE-2024-57978 in your software?

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

Check your SBOMs for free