Bug 2347964 (CVE-2022-49376) - CVE-2022-49376 kernel: scsi: sd: Fix potential NULL pointer dereference
Summary: CVE-2022-49376 kernel: scsi: sd: Fix potential NULL pointer dereference
Keywords:
Status: NEW
Alias: CVE-2022-49376
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-02-26 03:12 UTC by OSIDB Bzimport
Modified: 2025-05-27 14:33 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-02-26 03:12:52 UTC
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().

Comment 3 Avinash Hanwate 2025-02-27 22:49:16 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025022646-CVE-2022-49376-9ec1@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.