Look up another CVE · open CVE-2024-57804 in the interactive tracker
CVE-2024-57804
scsi: mpi3mr: Fix corrupt config pages PHY state is switched in sysfs
Published 2025-01-11 (21 months ago) by the Linux kernel CNA. Subsystem drivers/scsi. Debian urgency: not yet assigned.
What to do, per Debian release
Debian's own status for CVE-2024-57804 in every release this site tracks, and what each one means in practice. Every status below is the one the Debian Security Team publishes for this CVE. source
| Release | Status | Version | What this means |
|---|---|---|---|
| Debian 12bookworm | vulnerable | 6.1.190-1 | No fix published anywhere yet, neither in Debian nor upstream for the series bookworm tracks. Watch the Debian tracker page for this CVE. Advisories for bookworm have historically landed a median of 23 days after publication. |
| Debian 13trixie | fixed | 6.12.8-1 | Update the kernel and reboot. Fixed in 6.12.8-1. A running kernel keeps the old code until the machine restarts. |
| Debian 14forky | fixed | 6.12.8-1 | Update the kernel and reboot. Fixed in 6.12.8-1. A running kernel keeps the old code until the machine restarts. |
| Debian unstablesid | fixed | 6.12.8-1 | Update the kernel and reboot. Fixed in 6.12.8-1. A running kernel keeps the old code until the machine restarts. |
The vulnerability
What the bug is
The driver, through the SAS transport, exposes a sysfs interface to enable/disable PHYs in a controller/expander setup. When multiple PHYs are disabled and enabled in rapid succession, the persistent and current config pages related to SAS IO unit/SAS Expander pages could get corrupted. Use separate memory for each config request.
Where it lives
The fix touches these files. If the subsystem is one you do not use, the practical exposure is lower, though the package is still the vulnerable one.
drivers/scsi/mpi3mr/mpi3mr.h
drivers/scsi/mpi3mr/mpi3mr_fw.c
- What this is
- BROADCOM MPI3 STORAGE CONTROLLER DRIVERMAINTAINERS section matched on drivers/scsi/mpi3mr/ · mpi3mr-linuxdrv.pdl@broadcom.com · Supported
- Kernel module
- mpi3mr
Check it on the machine
grep -w CONFIG_SCSI_MPI3MR /boot/config-$(uname -r)Reads the booted kernel's own configuration, on the machine and nowhere else. =y is built in, =m is a module, and an is not set line means the code is not there.
lsmod | grep -w mpi3mrPrints a line if that module is loaded right now, and nothing if it is not. One that is not loaded can still be loaded later by anything that needs it.
Show whether Debian builds this, per release
Debian builds this, but not on every flavour. At least one release below builds the code on some of its kernel flavours and not on others, so the answer depends on the architecture and flavour installed.
- bookwormm
- trixieMnot built on armel/rpi
- forky, sidm
- m
- a loadable module on every flavour - check lsmod, can be blacklisted
- M
- a module where it is built at all; some flavours do not build it
- Build switch
- CONFIG_SCSI_MPI3MR
From the configuration Debian publishes for every kernel flavour it builds. It covers only the architectures Debian ships a linux-config package for, and nothing about a kernel you built yourself. Debian's own status above stays authoritative about the source package.MAINTAINERS kbuild Makefiles Debian linux-config packages
Signals
- Published
- 2025-01-11 (21 months ago)source
- CVSS
- 7.3 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:Hsource recompute it - Attack vector
- local (AV:L)source
- EPSS
- 0.19%, higher than 7.6% of all CVEssource
- CISA KEV
- not listedthe KEV catalogue
- Debian urgency
- not yet assignedsource
- Subsystem
- drivers/scsi
Upstream fixes
The versions the CNA records as introducing and fixing this, and the commit for each. source
| Introduced | Fixed in | Commit |
|---|---|---|
| 6.1 | 6.12.8 | 869fdc6f0606 |
| 6.1 | 6.13 | 711201a8b833 |
Why the CNA scored it this way
Quoted from the kernel CNA's own scoring file, word for word. A highlighted metric carries the most severe value CVSS v3.1 defines for it, which is what pushes the score up. source
- AV:LAttack vector, local
- The vulnerable code is reached only through local sysfs attributes under /sys/class/sas_phy/ (phy error counters, enable, link rate) and the bsg device; there is no network-facing path into mpi3mr config-page processing.
- AC:LAttack complexity, low
- The attacker controls both sides of the race by concurrently reading the world-readable phy error-counter attributes across multiple phys/threads, each of which memsets and reuses the shared mrioc->cfg_page outside cfg_cmds.mutex; the commit itself notes the corruption occurs on operations "in rapid succession", with no attacker-uncontrollable precondition.
- PR:LPrivileges required, low
- The SAS transport exports invalid_dword_count, running_disparity_error_count, loss_of_dword_sync_count and phy_reset_problem_count with S_IRUGO (0444), and reading them invokes mpi3mr_transport_get_linkerrors() -> mpi3mr_cfg_get_sas_phy_pg1() -> mpi3mr_process_cfg_req(), so an unprivileged local user can drive the racy shared-buffer path and corrupt config requests issued by any other context, including a privileged WRITE_PERSISTENT.
- UI:NUser interaction, none
- The attacker's own concurrent sysfs reads race each other and race the driver's internal discovery/reset config-page reads; no victim action is required to trigger the corruption.
- S:UScope, unchanged
- The corrupted state is the HBA driver's DMA buffer and the controller configuration it manages, all within the kernel's own security authority; no VM, IOMMU, or sandbox boundary is crossed.
- C:LConfidentiality impact, low
- A thread's post-mutex read-out memcpy can return a different config page's contents (device SAS addresses/WWNs, enclosure identifiers, expander topology, driver page settings), which are then surfaced to unprivileged userspace through the world-readable phy sysfs attributes; the leak is bounded to the 1024-byte shared config buffer rather than arbitrary kernel memory.
- I:HIntegrity impact, high
- mpi3mr_cfg_set_sas_io_unit_pg1() performs WRITE_CURRENT and WRITE_PERSISTENT with a payload staged in the unlocked shared buffer, so a racing reader causes zeroed/foreign data to be DMA'd into the controller's non-volatile SAS IO Unit / SAS Expander configuration, and garbled reads poison the driver's SAS topology state (device handles, SAS addresses, port IDs) used for I/O routing — a direct and serious integrity loss.
- A:HAvailability impact, high
- A corrupted persistent SAS IO Unit Page 1 leaves PHYs disabled or with invalid link rates, so storage behind the HBA fails to come back and the misconfiguration survives reboot; additionally a botched config request drives mpi3mr_check_rh_fault_ioc(MPI3MR_RESET_FROM_CFG_REQ_TIMEOUT), diag-faulting and resetting the controller and potentially marking it unrecoverable, stalling all attached I/O.