CVE-2022-49376 scsi: sd: Fix potential NULL pointer dereference

Medium 5.5 Published Updated

A NULL pointer dereference in the Linux kernel SCSI driver can cause a system crash when an early error occurs during disk probing.

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

CVE-2022-49376 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:

scsi: sd: Fix potential NULL pointer dereference

If sd_probe() sees an early error before sdkp->device is initialized, sd_zbc_release_disk() is called. This causes a NULL pointer dereference when sd_is_zoned() is called inside that function. Avoid this by removing the call to sd_zbc_release_disk() in sd_probe() error path.

This change is safe and does not result in zone information memory leakage because the zone information for a zoned disk is allocated only when sd_revalidate_disk() is called, at which point sdkp->disk_dev is fully set, resulting in sd_disk_release() being called when needed to cleanup a disk zone information using sd_zbc_release_disk().

Weakness: CWE-476

Which versions are affected by CVE-2022-49376?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2022-49376?

Apply the vendor's patch.

Is CVE-2022-49376 being exploited?

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

All Linux kernel vulnerabilities

Sources

Also known as DEBIAN-CVE-2022-49376, GHSA-m562-wccv-64rv, UBUNTU-CVE-2022-49376.

Is CVE-2022-49376 in your software?

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

Check your SBOMs for free