CVE-2022-49731 ata: libata-core: fix NULL pointer deref in ata_host_alloc_pinfo()

Medium 5.5 Published Updated

A NULL pointer dereference in the Linux kernel's libata-core module can cause a kernel oops, 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-2022-49731?

CVE-2022-49731 is a medium-severity vulnerability in Linux kernel, published on 26 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:

ata: libata-core: fix NULL pointer deref in ata_host_alloc_pinfo()

In an unlikely (and probably wrong?) case that the 'ppi' parameter of ata_host_alloc_pinfo() points to an array starting with a NULL pointer, there's going to be a kernel oops as the 'pi' local variable won't get reassigned from the initial value of NULL. Initialize 'pi' instead to '&ata_dummy_port_info' to fix the possible kernel oops for good...

Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool.

Weakness: CWE-476

Which versions are affected by CVE-2022-49731?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2022-49731?

Apply the vendor's patch.

Is CVE-2022-49731 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2022-49731, GHSA-x8fr-74rg-389v, UBUNTU-CVE-2022-49731.

Is CVE-2022-49731 in your software?

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

Check your SBOMs for free