ata: libata-core: fix NULL pointer deref in ata_host_alloc_pinfo()
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.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 4.14.285, 4.19.249, 4.9.320, 5.10.124, 5.15.49, 5.18.6, 5.4.200
- CVEs
- CVE-2022-49731
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 2 Nov 2026, 19:05 UTC · Revision 1
Source evidence
ata: libata-core: fix NULL pointer deref in ata_host_alloc_pinfo()
core-osv · Original sourcePublished 26 Feb 2025, 02:24 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.
osv:CVE-2022-49731
Kernel
Fixed versions: 4.9.320, 4.14.285, 4.19.249, 5.4.200, 5.10.124, 5.15.49, 5.18.6
Complete source record
{
"id": "c76c5211a3d6819c5fb8171c6e48b9e256e997003878a4e75d7e24ccf3370197",
"url": "https://osv.dev/vulnerability/CVE-2022-49731",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "ata: libata-core: fix NULL pointer deref in ata_host_alloc_pinfo()",
"summary": "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.",
"evidence": "osv:CVE-2022-49731",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "4.9.320",
"evidence": "/affected/1/ranges"
},
{
"value": "4.14.285",
"evidence": "/affected/1/ranges"
},
{
"value": "4.19.249",
"evidence": "/affected/1/ranges"
},
{
"value": "5.4.200",
"evidence": "/affected/1/ranges"
},
{
"value": "5.10.124",
"evidence": "/affected/1/ranges"
},
{
"value": "5.15.49",
"evidence": "/affected/1/ranges"
},
{
"value": "5.18.6",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "medium",
"structured": {
"id": "CVE-2022-49731",
"aliases": [
"CVE-2022-49731"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "f5cda257296fbd3683b1f568f2d94d3caaacf74d"
},
{
"fixed": "ca4693e6e06e4fd2b240c0fec47aa2498c94848e"
},
{
"fixed": "1ac5efee33f29e704226506d429b84575a5d66f8"
},
{
"fixed": "a810bd5af06977a847d1f202b22d7defd5c62497"
},
{
"fixed": "253334f84c81bc6a43af489f108c0bddad989eef"
},
{
"fixed": "36cd19e7d4e5571d77a2ed20c5b6ef50cf57734a"
},
{
"fixed": "ff128fbea720bf763fa345680dda5f050bc24a47"
},
{
"fixed": "07cbdb4807d369fbda73062a91b570c4dc5ec429"
},
{
"fixed": "bf476fe22aa1851bab4728e0c49025a6a0bea307"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49731.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "2.6.22"
},
{
"fixed": "4.9.320"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "4.10.0"
},
{
"fixed": "4.14.285"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "4.15.0"
},
{
"fixed": "4.19.249"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "4.20.0"
},
{
"fixed": "5.4.200"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.5.0"
},
{
"fixed": "5.10.124"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.11.0"
},
{
"fixed": "5.15.49"
}
]
},
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.16.0"
},
{
"fixed": "5.18.6"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49731.json"
}
}
],
"modified": "2026-10-28T02:30:22.931812464Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/07cbdb4807d369fbda73062a91b570c4dc5ec429",
"https://git.kernel.org/stable/c/1ac5efee33f29e704226506d429b84575a5d66f8",
"https://git.kernel.org/stable/c/253334f84c81bc6a43af489f108c0bddad989eef",
"https://git.kernel.org/stable/c/36cd19e7d4e5571d77a2ed20c5b6ef50cf57734a",
"https://git.kernel.org/stable/c/a810bd5af06977a847d1f202b22d7defd5c62497",
"https://git.kernel.org/stable/c/bf476fe22aa1851bab4728e0c49025a6a0bea307",
"https://git.kernel.org/stable/c/ca4693e6e06e4fd2b240c0fec47aa2498c94848e",
"https://git.kernel.org/stable/c/ff128fbea720bf763fa345680dda5f050bc24a47",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49731.json",
"https://nvd.nist.gov/vuln/detail/CVE-2022-49731",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49731.json"
}
},
"related_cves": [
{
"value": "CVE-2022-49731",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 488944,
"published_at": "2025-02-26T02:24:41.3+00:00"
}