cve.bz

CVE-2022-50315 linux linux kernel: Improper Validation of Array Index

7.8 highEPSS 0.2%Fix available

High (7.8) in linux linux kernel. EPSS 0.2% estimated probability of exploitation activity in the next 30 days.

On this page
In the Linux kernel, the following vulnerability has been resolved: ata: ahci: Match EM_MAX_SLOTS with SATA_PMP_MAX_PORTS UBSAN complains about array-index-out-of-bounds: [ 1.980703] kernel: UBSAN: array-index-out-of-bounds in /build/linux-9H675w/linux-5.15.0/drivers/ata/libahci.c:968:41 [ 1.980709] kernel: index 15 is out of range for type 'ahci_em_priv [8]' [ 1.980713] kernel: CPU: 0 PID: 209 Comm: scsi_eh_8 Not tainted 5.15.0-25-generic #25-Ubuntu [ 1.980716] kernel: Hardware name: System manufacturer System Product Name/P5Q3, BIOS 1102 06/11/2010 [ 1.980718] kernel: Call Trace: [ 1.980721] kernel: <TASK> [ 1.980723] kernel: show_stack+0x52/0x58 [ 1.980729] kernel: dump_stack_lvl+0x4a/0x5f [ 1.980734] kernel: dump_stack+0x10/0x12 [ 1.980736] kernel: ubsan_epilogue+0x9/0x45 [ 1.980739] kernel: __ubsan_handle_out_of_bounds.cold+0x44/0x49 [ 1.980742] kernel: ahci_qc_issue+0x166/0x170 [libahci] [ 1.980748] kernel: ata_qc_issue+0x135/0x240 [ 1.980752] kernel: ata_exec_internal_sg+0x2c4/0x580 [ 1.980754] kernel: ? vprintk_default+0x1d/0x20 [ 1.980759] kernel: ata_exec_internal+0x67/0xa0 [ 1.980762] kernel: sata_pmp_read+0x8d/0xc0 [ 1.980765] kernel: sata_pmp_read_gscr+0x3c/0x90 [ 1.980768] kernel: sata_pmp_attach+0x8b/0x310 [ 1.980771] kernel: ata_eh_revalidate_and_attach+0x28c/0x4b0 [ 1.980775] kernel: ata_eh_recover+0x6b6/0xb30 [ 1.980778] kernel: ? ahci_do_hardreset+0x180/0x180 [libahci] [ 1.980783] kernel: ? ahci_stop_engine+0xb0/0xb0 [libahci] [ 1.980787] kernel: ? ahci_do_softreset+0x290/0x290 [libahci] [ 1.980792] kernel: ? trace_event_raw_event_ata_eh_link_autopsy_qc+0xe0/0xe0 [ 1.980795] kernel: sata_pmp_eh_recover.isra.0+0x214/0x560 [ 1.980799] kernel: sata_pmp_error_handler+0x23/0x40 [ 1.980802] kernel: ahci_error_handler+0x43/0x80 [libahci] [ 1.980806] kernel: ata_scsi_port_error_handler+0x2b1/0x600 [ 1.980810] kernel: ata_scsi_error+0x9c/0xd0 [ 1.980813] kernel: scsi_error_handler+0xa1/0x180 [ 1.980817] kernel: ? scsi_unjam_host+0x1c0/0x1c0 [ 1.980820] kernel: kthread+0x12a/0x150 [ 1.980823] kernel: ? set_kthread_struct+0x50/0x50 [ 1.980826] kernel: ret_from_fork+0x22/0x30 [ 1.980831] kernel: </TASK> This happens because sata_pmp_init_links() initialize link->pmp up to SATA_PMP_MAX_PORTS while em_priv is declared as 8 elements array. I can't find the maximum Enclosure Management ports specified in AHCI spec v1.3.1, but "12.2.1 LED message type" states that "Port Multiplier Information" can utilize 4 bits, which implies it can support up to 16 ports. Hence, use SATA_PMP_MAX_PORTS as EM_MAX_SLOTS to resolve the issue. BugLink: https://bugs.launchpad.net/bugs/1970074

Severity

CVSS 3.1

7.8 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
0.2% (unchanged from 0.2% a week ago; 0.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 7th percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2026-10-15. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-129 Improper Validation of Array Index
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2022-50315 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-50315?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-50315?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2022-50315 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Linux2.6.27 and later

Fixed in

ProductRelease lineFixed in
Linux4.94.9.332
Linux4.144.14.298
Linux4.194.19.264
Linux5.45.4.221
Linux5.105.10.152
Linux5.155.15.76
Linux6.06.0.6
Linuxlater releases6.1

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14linux6.0.6-1DEBIAN-CVE-2022-50315
Ubuntu16.04:LTSlinux-hwe-edgeno fix listedUBUNTU-CVE-2022-50315
Ubuntu18.04:LTSlinux4.15.0-204.215UBUNTU-CVE-2022-50315
Ubuntu18.04:LTSlinux-aws4.15.0-1150.163UBUNTU-CVE-2022-50315
Ubuntu18.04:LTSlinux-aws-5.45.4.0-1096.104~18.04.1UBUNTU-CVE-2022-50315
Ubuntu18.04:LTSlinux-azure-4.154.15.0-1161.176UBUNTU-CVE-2022-50315
Ubuntu18.04:LTSlinux-azure-5.45.4.0-1103.109~18.04.1UBUNTU-CVE-2022-50315
Ubuntu18.04:LTSlinux-gcp, linux-hwe, linux-oem and 12 moreno fix listedUBUNTU-CVE-2022-50315
Ubuntu18.04:LTSlinux-gcp-4.154.15.0-1145.161UBUNTU-CVE-2022-50315
Ubuntu18.04:LTSlinux-gcp-5.45.4.0-1100.109~18.04.1UBUNTU-CVE-2022-50315
Ubuntu18.04:LTSlinux-hwe-5.45.4.0-139.156~18.04.1UBUNTU-CVE-2022-50315
Ubuntu18.04:LTSlinux-ibm-5.45.4.0-1044.49~18.04.1UBUNTU-CVE-2022-50315
Ubuntu18.04:LTSlinux-kvm4.15.0-1135.140UBUNTU-CVE-2022-50315
56 more for Ubuntu in the JSON and on Ubuntu's page.
Red Hatrhel_e4s:9.2::appstreambpftool-debuginfo0:7.0.0-284.200.1.el9_2RHSA-2026:92993
Red Hatrhel_e4s:9.2::appstreamperf, rtla, kernel-doc and 22 more0:5.14.0-284.200.1.el9_2RHSA-2026:92993
Red Hatrhel_e4s:9.2::baseosbpftool, bpftool-debuginfo0:7.0.0-284.200.1.el9_2RHSA-2026:92993
Red Hatrhel_e4s:9.2::baseoskernel, kernel-64k, kernel-core and 40 more0:5.14.0-284.200.1.el9_2RHSA-2026:92993
Red Hatrhel_e4s:9.2::nfvkernel-rt, kernel-rt-kvm, kernel-rt-core and 14 more0:5.14.0-284.200.1.rt14.485.el9_2RHSA-2026:93047
Red Hatrhel_e4s:9.2::realtimekernel-rt, kernel-rt-core, kernel-rt-debug and 12 more0:5.14.0-284.200.1.rt14.485.el9_2RHSA-2026:93047

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat.

Red Hat

Red Hat rates this Moderate.

Red Hat's statement

This vulnerability is rated as Moderate severity rather than Low because successful exploitation can cause memory corruption leading to a kernel crash and denial of service. The issue requires specific hardware configurations involving SATA Port Multipliers connected to an AHCI host controller with enclosure management active. On typical enterprise installations where standard direct-attached storage or NVMe drives are utilized without port multipliers, this flawed code path is not exercised.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options don't meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 9.2 Update Services for SAP Solutionskernel-0:5.14.0-284.200.1.el9_2Fixed 2026-10-30RHSA-2026:92993
Red Hat Enterprise Linux 9.2 Update Services for SAP Solutionskernel-rt-0:5.14.0-284.200.1.rt14.485.el9_2Fixed 2026-10-30RHSA-2026:93047
Red Hat Enterprise Linux 10kernelNot affected
Red Hat Enterprise Linux 6kernelNot affected
Red Hat Enterprise Linux 7kernelNot affected
Red Hat Enterprise Linux 7kernel-rtNot affected
Red Hat Enterprise Linux 8kernelNot affected
Red Hat Enterprise Linux 8kernel-rtNot affected
Red Hat Enterprise Linux 9kernelAffected
Red Hat Enterprise Linux 9kernel-rtAffected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2022-50315.

Attack patterns (CAPEC)

  • CAPEC-100 Overflow Buffers Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON