Bug 2348194 (CVE-2022-49731)

Summary: CVE-2022-49731 kernel: ata: libata-core: fix NULL pointer deref in ata_host_alloc_pinfo()
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: dfreiber, drow, jburrell, vkumar
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the libata module in the Linux kernel. A NULL pointer dereference can be triggered in the unlikely case that the PPI, an array of ATA port_info, argument of the ata_host_alloc_pinfo function is NULL. This issue causes a crash and results in a denial of service.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description OSIDB Bzimport 2025-02-26 03:20:53 UTC
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.

Comment 1 Avinash Hanwate 2025-02-26 19:36:40 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025022634-CVE-2022-49731-c7ba@gregkh/T

Comment 4 Avinash Hanwate 2025-02-27 16:13:44 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025022634-CVE-2022-49731-c7ba@gregkh/T