{
  "cveId": "CVE-2022-50315",
  "url": "https://patchblox.com/security/cve/CVE-2022-50315",
  "summary": "CVE-2022-50315 is fixed in linux on 1 platform, first by DEBIAN-CVE-2022-50315, released September 15, 2025. It is not reported as exploited. Patch Radar priority: High.",
  "title": "linux: In the Linux kernel, the following vulnerability has been resolved:  ata: ahci: Match EM_MAX_SLOTS with SATA_PMP_MAX_...",
  "description": "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 \u0027ahci_em_priv [8]\u0027 [ 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: \u003CTASK\u003E [ 1.980723] kernel: show_stack\u002B0x52/0x58 [ 1.980729] kernel: dump_stack_lvl\u002B0x4a/0x5f [ 1.980734] kernel: dump_stack\u002B0x10/0x12 [ 1.980736] kernel: ubsan_epilogue\u002B0x9/0x45 [ 1.980739] kernel: __ubsan_handle_out_of_bounds.cold\u002B0x44/0x49 [ 1.980742] kernel: ahci_qc_issue\u002B0x166/0x170 [libahci] [ 1.980748] kernel: ata_qc_issue\u002B0x135/0x240 [ 1.980752] kernel: ata_exec_internal_sg\u002B0x2c4/0x580 [ 1.980754] kernel: ? vprintk_default\u002B0x1d/0x20 [ 1.980759] kernel: ata_exec_internal\u002B0x67/0xa0 [ 1.980762] kernel: sata_pmp_read\u002B0x8d/0xc0 [ 1.980765] kernel: sata_pmp_read_gscr\u002B0x3c/0x90 [ 1.980768] kernel: sata_pmp_attach\u002B0x8b/0x310 [ 1.980771] kernel: ata_eh_revalidate_and_attach\u002B0x28c/0x4b0 [ 1.980775] kernel: ata_eh_recover\u002B0x6b6/0xb30 [ 1.980778] kernel: ? ahci_do_hardreset\u002B0x180/0x180 [libahci] [ 1.980783] kernel: ? ahci_stop_engine\u002B0xb0/0xb0 [libahci] [ 1.980787] kernel: ? ahci_do_softreset\u002B0x290/0x290 [libahci] [ 1.980792] kernel: ? trace_event_raw_event_ata_eh_link_autopsy_qc\u002B0xe0/0xe0 [ 1.980795] kernel: sata_pmp_eh_recover.isra.0\u002B0x214/0x560 [ 1.980799] kernel: sata_pmp_error_handler\u002B0x23/0x40 [ 1.980802] kernel: ahci_error_handler\u002B0x43/0x80 [libahci] [ 1.980806] kernel: ata_scsi_port_error_handler\u002B0x2b1/0x600 [ 1.980810] kernel: ata_scsi_error\u002B0x9c/0xd0 [ 1.980813] kernel: scsi_error_handler\u002B0xa1/0x180 [ 1.980817] kernel: ? scsi_unjam_host\u002B0x1c0/0x1c0 [ 1.980820] kernel: kthread\u002B0x12a/0x150 [ 1.980823] kernel: ? set_kthread_struct\u002B0x50/0x50 [ 1.980826] kernel: ret_from_fork\u002B0x22/0x30 [ 1.980831] kernel: \u003C/TASK\u003E  This happens because sata_pmp_init_links() initialize link-\u003Epmp up to SATA_PMP_MAX_PORTS while em_priv is declared as 8 elements array.  I can\u0027t find the maximum Enclosure Management ports specified in AHCI spec v1.3.1, but \u002212.2.1 LED message type\u0022 states that \u0022Port Multiplier Information\u0022 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",
  "published": "2025-09-15T15:15:43Z",
  "severity": "high",
  "cvss": 7.8,
  "cvssVector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
  "epss": 0.00168,
  "epssPercentile": 0.0619,
  "priority": "High",
  "priorityTier": 3,
  "exploited": false,
  "vendorExploited": false,
  "disclosed": false,
  "fixes": [
    {
      "platform": "linux",
      "product": "linux",
      "release": "Debian 12.15 (bookworm)",
      "fixedVersion": "6.0.6-1",
      "fix": "DEBIAN-CVE-2022-50315",
      "url": "https://patchblox.com/security/fix/linux/debian-cve-2022-50315",
      "released": "2025-09-15T15:15:43Z"
    },
    {
      "platform": "linux",
      "product": "linux",
      "release": "Debian 13.5 (trixie)",
      "fixedVersion": "6.0.6-1",
      "fix": "DEBIAN-CVE-2022-50315",
      "url": "https://patchblox.com/security/fix/linux/debian-cve-2022-50315",
      "released": "2025-09-15T15:15:43Z"
    },
    {
      "platform": "linux",
      "product": "linux",
      "release": "Debian 14",
      "fixedVersion": "6.0.6-1",
      "fix": "DEBIAN-CVE-2022-50315",
      "url": "https://patchblox.com/security/fix/linux/debian-cve-2022-50315",
      "released": "2025-09-15T15:15:43Z"
    }
  ],
  "noFixYet": [],
  "dataAsOf": "2026-11-09T01:18:40Z",
  "attribution": {
    "text": "Data: Patchblox Patch Radar",
    "url": "https://patchblox.com/security/patch-radar",
    "terms": "https://patchblox.com/security/patch-radar/use-the-data"
  }
}