public inbox for [email protected]
 help / color / mirror / Atom feed
This is experimental automated Linux kernel CVE triage research. Results are heuristic and may be incorrect. This site is not an official vendor advisory or severity source.
* [CVE-2022-50315][MODERATE REGULAR] ata: ahci: Match EM_MAX_SLOTS with SATA_PMP_MAX_PORTS
@ 2026-12-01 19:25 AL-KERNEL
  0 siblings, 0 replies; only message in thread
From: AL-KERNEL @ 2026-12-01 19:25 UTC (permalink / raw)
  To: kernel-cve

CVE: CVE-2022-50315
Priority: MODERATE REGULAR
AL-KERNEL base severity: MODERATE
KPANIC flag: NO
Patch: ata: ahci: Match EM_MAX_SLOTS with SATA_PMP_MAX_PORTS
Commit: f70bd4339cb68bc7e206af4c922bc0d249244403
Upstream patch: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f70bd4339cb68bc7e206af4c922bc0d249244403
Original CVE announcement: https://lore.kernel.org/linux-cve-announce/?q=CVE-2022-50315
Analysis date: Tue, 01 Dec 2026 15:25:53 -0400
ActionableScore: 1
ActionableScore lower bound: 0
Actionable bucket: Ordinary Moderate
Manual review required: NO

Summary:
An uncommon AHCI enclosure-management topology can drive a confirmed out-of-bounds per-port array access, with warning and possible crash impact but no proven write or exploitation primitive.

======================================================================
ABOUT THIS REPORT
======================================================================

The original Linux kernel CVE announcement for CVE-2022-50315 is available here:
https://lore.kernel.org/linux-cve-announce/?q=CVE-2022-50315

The original announcement does not normally provide a security severity
estimate, CVSS assessment, or enough information to determine whether the
reported kernel bug represents a practically relevant security issue.

This report was generated by AL-KERNEL, an AI-assisted Linux kernel
vulnerability analysis system developed by Alexander Larkin. It combines
an autonomous classifier with LLM-assisted technical analysis and a
separate ActionableScore mechanism.

The purpose of this report is to prioritize Linux kernel CVEs before
manual review, identify cases that require prompt investigation, and
support automatic closure of issues that are unlikely to have meaningful
security impact.

Published priority for this report: MODERATE REGULAR
Manual review required: NO

A detailed explanation of the methodology and priority rules is included
at the end of this message.

======================================================================
AL-KERNEL CLASSIFICATION RESULT
======================================================================

CVE-2022-50315	MODERATE	https://www.kernelcve.org/list/?q=CVE-2022-50315 CHECK WITH IMPACT FROM ORIG NN IMPORTANT | AEGIS IMPACT MODERATE AEGIS_AS=0 LEGACY=MODERATE RESULT=SAME (final reconciliation agrees; DECISION: both MODERATE)	Maybe valid. Check manually. Hints by AL-KERNEL: The best (paranoid) CVSS is 'AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H';CWE-129;CWE-125;*CWE-787;Other CVSS 'AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H';BEST CVSS score: '7';DESCR 'An undersized ahci_em_priv array permits an out of bounds access when AHCI processes a command for a SATA port multiplier link numbered from 8 through 15. UBSAN confirms index 15 against an array of 8 elements in ahci_qc_issue. Reliable triggering requires AHCI Enclosure Management and a SATA PMP topology exposing a high numbered port, so the issue is not network reachable and attack complexity is high. For the CVSS the PR:L value reflects that a local process can generate storage activity when the affected topology is already present, although creating or changing that hardware topology normally requires physical or administrative control. The demonstrated impact is a kernel warning and possible availability failure. A worst case memory corruption or privilege escalation path remains plausible because the invalid ahci_em_priv element can expose mutable activity and timer state, but no controlled arbitrary write is established. Automated impact decision path. The original SimpleNet classifier selected IMPORTANT. The primary LLM estimated paranoid CVSS 7 and the production ActionableScore returned 1 with recommendation Ordinary Moderate. The production rules then evaluated CVSS thresholds and ActionableScore thresholds. Recorded rule transitions were ActionableScore thresholds stage IMPORTANT to MODERATE because the ActionableScore threshold rule was applied. The legacy KP specialist has no review artifact for this run. The legacy FD or DH downgrade specialist has no review artifact for this run. Exact triggered rule markers were DECREASED_TO_MODERATE70_BASED_ON_ACTIONABLESCORELOWERTHAN5 and DECREASED_TO_MODERATEREG_BASED_ON_ACTIONABLESCORELESSTHAN4. The independent weaker Aegis shadow evaluated CVSS 2.0 and ActionableScore 0 with primitive class CLASS_C and manual review REQUIRED. Its independently reconciled impact was MODERATE. The shadow agreed with the final production impact and aggregation did not change that impact. The final reported impact is MODERATE.';YES REQUIRES MANUAL CHECK; ,and ActionableScore result is Ordinary Moderate (with actual score 1)	MAYBE	WRITE KASAN OOB LEAK HARDWARE LINUS CVEOUTDATED  DECREASED_TO_MODERATE70_BASED_ON_ACTIONABLESCORELOWERTHAN5 DECREASED_TO_MODERATEREG_BASED_ON_ACTIONABLESCORELESSTHAN4	-	-	checked

======================================================================
ACTIONABLESCORE ANALYSIS
======================================================================

ActionableScore=1
ActionableScoreLower=0
PrimitiveClass=CLASS_C
RealUAF=NO
HostAdminRequired=NO
NamespaceScopedPrivilege=NO
ImportantCandidate=NO
ManualReview=RECOMMENDED
AutoDowngradeAllowed=YES
RequiresHostUID0=NO
AuthorizationDecisionBypass=NO
ProtectedResourceImpact=NONE
B4PendingReview=NO
B4PendingConfirmed=NO

1. ActionableScore

* Raw base score: 0.
* Conservative score: 0; no floor or cap applied.
* Raw paranoid score: 1.
* Paranoid score: 1; no floor or cap applied.
* Final recommended bucket: **Ordinary Moderate**::

2. Signal breakdown

* +1 weak/indirect corruption candidate: `link->pmp` can index `ahci_em_priv[8]` at indices 8–15; UBSAN confirms index 15.
* +1 local unprivileged trigger: supplied evidence says a local process can generate storage activity once the affected topology exists.
* -2 rare hardware/topology prerequisite: AHCI Enclosure Management plus a SATA port multiplier exposing a high-numbered port is materially required.
* Paranoid only, +1 plausible kernel crash/DoS: an out-of-bounds structured access can fault, but the supplied trace establishes a UBSAN warning rather than a panic.

Not awarded:

* No confirmed write direction is visible in the patch or supplied source line; therefore no OOB-write or CLASS_A/B corrupt bonus.
* No attacker-selected payload, target, adjacent victim, disclosure, LPE, or protected-state modification is shown.
* NEW52 B5-R does not apply: there is no retry-accumulated index, missing retry reset, or proven later consumption of retry-corrupted state.
* No extra availability point; it would duplicate the same possible fault.

3. Reachability analysis

The affected hardware topology must already exist, normally requiring physical or administrative provisioning. Given that prerequisite, supplied evidence supports triggering through ordinary local storage activity, so effective host-admin power and UID 0 are not required for the later trigger. No namespace capability is involved. No race is shown; complexity comes from the uncommon hardware configuration.

4. Primitive and severity reading

The proven primitive is an out-of-bounds array index into undersized per-port AHCI enclosure-management state. The one-line fix expands the array from 8 to 16 entries. The evidence does not identify whether the reported instruction reads or writes the invalid element, so a confirmed heap/slab OOB write cannot be claimed. The demonstrated result is a UBSAN report; crash is plausible but not established. This is CLASS_C pending source-level confirmation of the exact access. ImportantCandidate is NO and auto-downgrade is allowed because no material non-crash corruption primitive or trust-boundary effect is proven.

5. One-sentence report phrase

An uncommon AHCI enclosure-management topology can drive a confirmed out-of-bounds per-port array access, with warning and possible crash impact but no proven write or exploitation primitive.

6. Manual review advice

MANUAL CHECK RECOMMENDED

Inspect the exact `libahci.c` expression and subsequent `ahci_em_priv` use to determine whether the invalid access mutates activity or timer state.

7. Call-site confidence

Call-site confidence: medium

======================================================================
UPSTREAM PATCH SUMMARY
======================================================================

Patch: ata: ahci: Match EM_MAX_SLOTS with SATA_PMP_MAX_PORTS
Commit: f70bd4339cb68bc7e206af4c922bc0d249244403
Upstream URL: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f70bd4339cb68bc7e206af4c922bc0d249244403

Commit description:

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
Cc: [email protected]
Signed-off-by: Kai-Heng Feng <[email protected]>
Signed-off-by: Damien Le Moal <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

Changed files:
  drivers/ata/libahci.c
  drivers/ata/ahci.h

Diff excerpt:

Not included in this email. See the upstream URL for the full patch.

Full patch:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f70bd4339cb68bc7e206af4c922bc0d249244403

======================================================================
DETAILED REPORT METHODOLOGY
======================================================================

The original Linux kernel CVE announcement for CVE-2022-50315 can be found here:
https://lore.kernel.org/linux-cve-announce/?q=CVE-2022-50315

The original CVE announcement normally does not include a security-level
estimate. In particular, it may not contain a CVSS assessment, an impact
level, or enough information to determine whether the reported bug is a
practically relevant security issue. One purpose of this parallel CVE list
is to provide that missing technical and prioritization information.

The original goal of the AL-KERNEL project was to prioritize Linux kernel
CVE analysis automatically before manual review. The system can also help
identify non-security issues that may be suitable for automatic closure.

This report was generated by AL-KERNEL, an AI-assisted Linux kernel
vulnerability analysis system developed by Alexander Larkin.

The first analysis stage combines an autonomous classifier with additional
LLM-based analysis. The autonomous classifier runs locally on a CPU and is
based on a backpropagation neural network. Together, these mechanisms
produce a technical vulnerability description, identify likely weakness
types, estimate CVSS severity, and provide input for ActionableScore.

Two CVSS estimates are retained because incomplete kernel vulnerability
information often permits more than one defensible interpretation:

  Conservative CVSS vector: AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H
  The Best / paranoid CVSS vector: AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
  The Best / paranoid CVSS score: 7

The conservative vector represents a lower-impact interpretation.
The Best/paranoid vector intentionally represents a plausible upper-bound
interpretation and should not automatically be treated as demonstrated
real-world impact.

CVSS may also need to be adjusted for a particular Linux deployment,
because actual reachability, privileges, enabled kernel configuration,
hardware, namespaces, exposed device nodes, and other environmental
conditions can differ significantly between systems.

A separate ActionableScore mechanism evaluates practical remediation
urgency. Its analysis may include reachability, attack prerequisites,
subsystem exposure, memory-corruption characteristics, denial-of-service
reliability, and possible confidentiality, integrity, or
privilege-escalation impact.

  Conservative ActionableScore: 0
  Paranoid ActionableScore: 1

The final base severity is taken directly from the second tab-separated
field of the AL-KERNEL classification result. ActionableScore does not
replace or independently override that final AL-KERNEL decision, and
if ActionableScore adjusted impact level of ALKERNEL, then you would see
self-readable flags above like INCREASED_TO_HIGH_BASED_ON_ACTIONABLESCOREHIGHEREQTHAN7.

For an AL-KERNEL result of MODERATE, this report uses the following
additional presentation split:

  ActionableScore below 5   -> MODERATE REGULAR
  ActionableScore 5 or more -> MODERATE 7.0

The distinction between MODERATE REGULAR and MODERATE 7.0 makes it
possible to identify Moderate issues that should receive manual analysis
and fixes before lower-priority MODERATE REGULAR issues. In many cases,
MODERATE REGULAR fixes may wait for a later rebase or routine update.

There is one override in which MODERATE REGULAR becomes MODERATE 7.0
even when the ActionableScore is below 5. When the AL-KERNEL result
contains the KPANIC flag, a MODERATE result is always presented as
MODERATE 7.0. The KPANIC flag selected with few regexps without
usage of AI at all, so it helps to detect cases when Kernel Crash happens
and similar (to filter False-Negative results from the LLM usage).

KPANIC indicates that a reliable kernel crash, kernel panic, or similarly
serious kernel availability impact was identified by the classification
workflow.

AL-KERNEL base severity for this report: MODERATE
KPANIC detected for this report: NO
Published priority for this report (same as in Subject): MODERATE REGULAR

These results are intended to support engineering triage. They are
machine-generated estimates, and cases marked for manual review should
be validated by a human security engineer before final disposition.
For more info read docs linked from here: https://kernelcve.org/
(and you can submit you own patch there to generate such a report
for non-existant CVE-id yet).

Note that in many cases this AI tool selects higher severity, than
real is (means you can expect Importants instead of Moderate 7.0 or
Moderates 7.0 instead of regular Moderates). If you see such cases,
please use reply email interface to add additional manual analyses
info to this particular CVE.
And please, please, let me know when you see Lows instead of Importants
or Important instead of Low (because particular for such cases I
need to tune this AI tool to make it better for this one and next similar).
My contact email for such notifications is [email protected] (and both
send reply to CVE record itself too and see "reply" button below for howto reply).

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-12-01 19:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-01 19:25 [CVE-2022-50315][MODERATE REGULAR] ata: ahci: Match EM_MAX_SLOTS with SATA_PMP_MAX_PORTS AL-KERNEL

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox