LiveActive security incident?Get immediate response
CVE Record

CVE-2022-50315: ata: ahci: Match EM_MAX_SLOTS with SATA_PMP_MAX_PORTS

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

UnknownCVSS not scoredNot KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

CVE-2022-50315 is a Linux kernel AHCI/SATA driver bug that can read past a small internal array when handling SATA port multiplier or enclosure-management data. The public record shows a kernel warning, not proven compromise. Business urgency is mainly for systems using affected Linux kernels with AHCI/SATA hardware paths.

Executive priority

Treat as a routine-to-priority kernel maintenance item, higher for storage-heavy Linux systems or devices using SATA port multipliers. There is no cited evidence of active exploitation, but kernel memory-safety issues should not remain unpatched unnecessarily.

Technical view

The bug is in drivers/ata/libahci.c. sata_pmp_init_links() can initialize link->pmp up to SATA_PMP_MAX_PORTS while ahci_em_priv was sized for 8 entries, causing UBSAN array-index-out-of-bounds. The fix aligns EM_MAX_SLOTS with SATA_PMP_MAX_PORTS. References are Linux stable commits for multiple kernel branches.

Likely exposure

Exposure is most likely on Linux systems running affected kernel versions with AHCI SATA controllers and port multiplier or enclosure-management behavior. The provided data lists Linux kernel ranges and stable fixes, but does not identify specific distributions or appliances.

Exploitation context

No KEV listing and no cited source states active exploitation. The source evidence shows a UBSAN out-of-bounds report during kernel SATA error-handling and port multiplier attachment. Practical exploitability is not established in the provided sources.

Researcher notes

The record lacks CVSS, CWE, and distribution-specific impact. The issue appears to be an array bounds mismatch in AHCI enclosure-management slot accounting. Avoid assuming privilege escalation or remote attack without additional evidence from kernel maintainers or downstream vendors.

Mitigation direction

  • Update to a vendor-supported kernel containing the referenced stable fix.
  • Check distribution advisories for CVE-2022-50315 applicability and package versions.
  • Prioritize systems using AHCI/SATA port multipliers or affected storage hardware paths.
  • If immediate update is unavailable, monitor vendor guidance for supported workarounds.

Validation and detection

  • Inventory Linux kernel versions across servers, workstations, and appliances.
  • Confirm whether systems use AHCI SATA and port multiplier configurations.
  • Check kernel changelogs for the referenced AHCI EM_MAX_SLOTS fix.
  • Review logs for UBSAN array-index-out-of-bounds in libahci.c or ahci_qc_issue.
  • Validate remediation by confirming the fixed vendor kernel is running.
Prepared
Confidence
medium
Sources
10

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cve · low confidence lookup

CVE-2022-50315 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Unknown
CVSS
Not scored
Known Exploited
No
Published
Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

0CVSS vectors
3Timeline events
0ADP providers
9Source links

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. CVE publishedCVE Program

    The CVE record was published.

  3. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
LinuxLinux18f7ba4c2f4be6b37d925931f04d6cc28d88d1ee, 18f7ba4c2f4be6b37d925931f04d6cc28d88d1ee, 18f7ba4c2f4be6b37d925931f04d6cc28d88d1ee, 18f7ba4c2f4be6b37d925931f04d6cc28d88d1ee, 18f7ba4c2f4be6b37d925931f04d6cc28d88d1ee, 18f7ba4c2f4be6b37d925931f04d6cc28d88d1ee, 18f7ba4c2f4be6b37d925931f04d6cc28d88d1ee, 18f7ba4c2f4be6b37d925931f04d6cc28d88d1eeunaffected
LinuxLinux2.6.27, 0, 4.9.332, 4.14.298, 4.19.264, 5.4.221, 5.10.152, 5.15.76, 6.0.6, 6.1affected
Weakness

CWE details

No CWE listed

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.