{"id":"CVE-2024-57804","state":"PUBLISHED","title":"scsi: mpi3mr: Fix corrupt config pages PHY state is switched in sysfs","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nscsi: mpi3mr: Fix corrupt config pages PHY state is switched in sysfs\n\nThe driver, through the SAS transport, exposes a sysfs interface to\nenable/disable PHYs in a controller/expander setup.  When multiple PHYs\nare disabled and enabled in rapid succession, the persistent and current\nconfig pages related to SAS IO unit/SAS Expander pages could get\ncorrupted.\n\nUse separate memory for each config request.","publishedAt":"2025-01-11T12:39:50.958Z","updatedAt":"2026-10-30T12:20:29.936Z","severity":{"score":7.3,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"32d457d5a2af9bf5ddbe28297eabf1fc93451665","status":"affected","lessThan":"90dffa3cec53c0d1af7813a2603f740730c4417e","versionType":"git"},{"version":"32d457d5a2af9bf5ddbe28297eabf1fc93451665","status":"affected","lessThan":"d7dade716905b189f17cc1601cbb4b421a811a28","versionType":"git"},{"version":"32d457d5a2af9bf5ddbe28297eabf1fc93451665","status":"affected","lessThan":"869fdc6f0606060301aef648231e186c7c542f5a","versionType":"git"},{"version":"32d457d5a2af9bf5ddbe28297eabf1fc93451665","status":"affected","lessThan":"711201a8b8334a397440ac0b859df0054e174bc9","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/scsi/mpi3mr/mpi3mr.h","drivers/scsi/mpi3mr/mpi3mr_fw.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.1","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.1","versionType":"semver"},{"version":"6.1.191","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.160","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.8","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/scsi/mpi3mr/mpi3mr.h","drivers/scsi/mpi3mr/mpi3mr_fw.c"]}],"references":["https://git.kernel.org/stable/c/90dffa3cec53c0d1af7813a2603f740730c4417e","https://git.kernel.org/stable/c/d7dade716905b189f17cc1601cbb4b421a811a28","https://git.kernel.org/stable/c/869fdc6f0606060301aef648231e186c7c542f5a","https://git.kernel.org/stable/c/711201a8b8334a397440ac0b859df0054e174bc9"],"weaknesses":[],"ingestedAt":"2026-10-30T12:36:04.432Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/57xxx/CVE-2024-57804.json","commit":"db8103c5921aac81d5d90efcf3745980dafabf49","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-57804","state":"PUBLISHED","datePublished":"2025-01-11T12:39:50.958Z","dateUpdated":"2026-10-30T12:20:29.936Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-01-09T09:50:31.793Z"},"containers":{"cna":{"title":"scsi: mpi3mr: Fix corrupt config pages PHY state is switched in sysfs","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nscsi: mpi3mr: Fix corrupt config pages PHY state is switched in sysfs\n\nThe driver, through the SAS transport, exposes a sysfs interface to\nenable/disable PHYs in a controller/expander setup.  When multiple PHYs\nare disabled and enabled in rapid succession, the persistent and current\nconfig pages related to SAS IO unit/SAS Expander pages could get\ncorrupted.\n\nUse separate memory for each config request."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"32d457d5a2af9bf5ddbe28297eabf1fc93451665","status":"affected","lessThan":"90dffa3cec53c0d1af7813a2603f740730c4417e","versionType":"git"},{"version":"32d457d5a2af9bf5ddbe28297eabf1fc93451665","status":"affected","lessThan":"d7dade716905b189f17cc1601cbb4b421a811a28","versionType":"git"},{"version":"32d457d5a2af9bf5ddbe28297eabf1fc93451665","status":"affected","lessThan":"869fdc6f0606060301aef648231e186c7c542f5a","versionType":"git"},{"version":"32d457d5a2af9bf5ddbe28297eabf1fc93451665","status":"affected","lessThan":"711201a8b8334a397440ac0b859df0054e174bc9","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/scsi/mpi3mr/mpi3mr.h","drivers/scsi/mpi3mr/mpi3mr_fw.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.1","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.1","versionType":"semver"},{"version":"6.1.191","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.160","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.8","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/scsi/mpi3mr/mpi3mr.h","drivers/scsi/mpi3mr/mpi3mr_fw.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/90dffa3cec53c0d1af7813a2603f740730c4417e"},{"url":"https://git.kernel.org/stable/c/d7dade716905b189f17cc1601cbb4b421a811a28"},{"url":"https://git.kernel.org/stable/c/869fdc6f0606060301aef648231e186c7c542f5a"},{"url":"https://git.kernel.org/stable/c/711201a8b8334a397440ac0b859df0054e174bc9"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:H","baseScore":7.3,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - 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.\nAC:L - 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.\nPR:L - 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.\nUI:N - 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.\nS:U - 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.\nC:L - 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.\nI:H - 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.\nA:H - 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."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-10-30T12:20:29.936Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.1.191"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.6.160"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.12.8"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.1","versionEndExcluding":"6.13"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-57804","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2026-10-15T21:41:29.743004Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-10-15T21:51:49.145Z"}}]}}}