Skip to main content

Linux Kernel CVE-2025-40118

HIGH
2025-11-12 416baaa9-dc9f-4396-8d5f-8c081fb06d67
7.8
CVSS 3.1 · Vendor: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Share

Severity by source

Vendor (416baaa9-dc9f-4396-8d5f-8c081fb06d67) PRIMARY
7.8 HIGH
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
vuln.today AI
5.1 MEDIUM

rmmod requires CAP_SYS_MODULE so PR:H; local-only AV:L; out-of-bounds write on unload corrupts kernel memory (A:H, minor I:L) with no confidentiality path (C:N).

3.1 AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:L/A:H
4.0 AV:L/AC:L/AT:N/PR:H/UI:N/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N
SUSE
6.1 MEDIUM
AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:H
Red Hat
5.8 MEDIUM
qualitative

Primary rating from Vendor (416baaa9-dc9f-4396-8d5f-8c081fb06d67).

CVSS VectorVendor: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

8
Analysis Updated
Jul 30, 2026 - 09:15 vuln.today
v4 (cvss_changed)
Analysis Updated
Jul 30, 2026 - 09:14 vuln.today
v3 (cvss_changed)
Analysis Updated
Jul 30, 2026 - 09:14 vuln.today
v2 (cvss_changed)
Re-analysis Queued
Jul 30, 2026 - 06:37 vuln.today
cvss_changed
CVSS changed
Jul 30, 2026 - 06:37 NVD
7.8 (HIGH)
Patch released
Mar 28, 2026 - 19:30 nvd
Patch available
Analysis Generated
Mar 28, 2026 - 19:21 vuln.today
CVE Published
Nov 12, 2025 - 11:15 nvd
N/A

DescriptionCVE.org

In the Linux kernel, the following vulnerability has been resolved:

scsi: pm80xx: Fix array-index-out-of-of-bounds on rmmod

Since commit f7b705c238d1 ("scsi: pm80xx: Set phy_attached to zero when device is gone") UBSAN reports:

UBSAN: array-index-out-of-bounds in drivers/scsi/pm8001/pm8001_sas.c:786:17 index 28 is out of range for type 'pm8001_phy [16]'

on rmmod when using an expander.

For a direct attached device, attached_phy contains the local phy id. For a device behind an expander, attached_phy contains the remote phy id, not the local phy id.

I.e. while pm8001_ha will have pm8001_ha->chip->n_phy local phys, for a device behind an expander, attached_phy can be much larger than pm8001_ha->chip->n_phy (depending on the amount of phys of the expander).

E.g. on my system pm8001_ha has 8 phys with phy ids 0-7. One of the ports has an expander connected. The expander has 31 phys with phy ids 0-30.

The pm8001_ha->phy array only contains the phys of the HBA. It does not contain the phys of the expander. Thus, it is wrong to use attached_phy to index the pm8001_ha->phy array for a device behind an expander.

Thus, we can only clear phy_attached for devices that are directly attached.

AnalysisAI

Memory corruption in the Linux kernel pm80xx SCSI driver (drivers/scsi/pm8001/pm8001_sas.c) lets a privileged local operation trigger an out-of-bounds array write when a module unload (rmmod) occurs on a system with a SAS expander attached. Introduced by commit f7b705c238d1, the flaw causes the driver to index the fixed 16-entry pm8001_ha->phy array with a remote expander phy id (observed index 28), corrupting kernel memory during teardown. No public exploit identified at time of analysis; EPSS is low (0.07%, 21st percentile) and it is not on CISA KEV, consistent with a stability/robustness bug rather than a weaponized escalation path.

Technical ContextAI

The pm80xx driver supports PMC-Sierra/Microsemi (Adaptec) 8001/8081-class SAS/SATA host bus adapters. Each HBA exposes a fixed number of local phys (pm8001_ha->chip->n_phy) tracked in the statically sized pm8001_ha->phy[16] array. When a device is directly attached, attached_phy holds the local phy id and safely indexes this array; but for a device behind a SAS expander, attached_phy holds the expander's REMOTE phy id, which can far exceed n_phy (the reporter's expander had 31 phys, ids 0-30). Using that remote id to index the local phy array is an out-of-bounds access. The root-cause class is an out-of-bounds array write/read (CWE-125/CWE-787), which the vendor input tags as 'Buffer Overflow'; UBSAN flags it as array-index-out-of-bounds at pm8001_sas.c:786. The CWE field is N/A in the source data.

Affected ProductsAI

The Linux kernel's pm80xx SCSI driver is affected on any version carrying commit f7b705c238d1 ('scsi: pm80xx: Set phy_attached to zero when device is gone') up to the fixes. The vulnerable code path is only reachable on systems using a pm80xx-supported SAS HBA with a SAS expander in the topology. No CPE strings were supplied in the intelligence; exact affected kernel version ranges should be taken from the Ubuntu advisories. Vendor/distributor advisories: Ubuntu USN-8126-1 (https://ubuntu.com/security/notices/USN-8126-1) and USN-8125-1 (https://ubuntu.com/security/notices/USN-8125-1), with upstream stable fixes at git.kernel.org.

RemediationAI

Patch available per vendor advisory: update to a fixed Linux kernel build. Distribution users should upgrade via Ubuntu USN-8125-1 and USN-8126-1 (https://ubuntu.com/security/notices/USN-8125-1, https://ubuntu.com/security/notices/USN-8126-1) and reboot into the new kernel. Upstream, apply the stable fixes referenced at git.kernel.org (e.g. https://git.kernel.org/stable/c/251be2f6037fb7ab399f68cd7428ff274133d693 and the other seven backport commits) which restrict clearing phy_attached to directly-attached devices only. As a compensating control until patched, avoid unloading the pm80xx module (rmmod) on hosts that have a SAS expander attached, since the fault only triggers on driver teardown in that topology; trade-off is that you cannot hot-unload/reload the driver for maintenance. Restricting CAP_SYS_MODULE / module unloading to trusted operators further limits who can reach the code path. Do not invent fix version numbers beyond what the advisories state.

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
Container suse/hpc/warewulf4-x86_64/sle-hpc-node:latest Image SLES15-SP6 Image SLES15-SP6-BYOS Image SLES15-SP6-BYOS-Azure Image SLES15-SP6-BYOS-EC2 Image SLES15-SP6-BYOS-GCE Image SLES15-SP6-CHOST-BYOS Image SLES15-SP6-CHOST-BYOS-Aliyun Image SLES15-SP6-CHOST-BYOS-Azure Image SLES15-SP6-CHOST-BYOS-EC2 Image SLES15-SP6-CHOST-BYOS-GCE Image SLES15-SP6-CHOST-BYOS-GDC Image SLES15-SP6-CHOST-BYOS-SAP-CCloud Image SLES15-SP6-EC2 Image SLES15-SP6-EC2-ECS-HVM Image SLES15-SP6-GCE Image SLES15-SP6-HPC-BYOS Image SLES15-SP6-HPC-BYOS-Azure Image SLES15-SP6-HPC-BYOS-EC2 Image SLES15-SP6-HPC-BYOS-GCE Image SLES15-SP6-HPC-EC2 Image SLES15-SP6-HPC-GCE Image SLES15-SP6-Hardened-BYOS Image SLES15-SP6-Hardened-BYOS-Azure Image SLES15-SP6-Hardened-BYOS-EC2 Image SLES15-SP6-Hardened-BYOS-GCE Image SLES15-SP6-SAP Image SLES15-SP6-SAP-Azure Image SLES15-SP6-SAP-EC2 Image SLES15-SP6-SAP-GCE Image SLES15-SP6-SAPCAL Image SLES15-SP6-SAPCAL-Azure Image SLES15-SP6-SAPCAL-EC2 Image SLES15-SP6-SAPCAL-GCE Affected
Container suse/sl-micro/6.0/baremetal-os-container:latest Container suse/sl-micro/6.1/baremetal-os-container:latest Affected
Container suse/sl-micro/6.0/base-os-container:2.1.3-7.95 Container suse/sl-micro/6.1/base-os-container:2.2.1-5.80 Affected
Container suse/sl-micro/6.0/kvm-os-container:2.1.3-6.114 Container suse/sl-micro/6.1/kvm-os-container:2.2.1-5.82 Affected
Container suse/sl-micro/6.0/rt-os-container:2.1.3-7.116 Container suse/sl-micro/6.1/rt-os-container:2.2.1-5.55 Affected

Share

CVE-2025-40118 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy