# CVE-2025-38445: md/raid1: Fix stack memory use after return in raid1\_reshape

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.1
- **CVSS:** 7.1 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.29% (percentile 15, 2026-11-26)
- **CWE:** CWE-125
- **Published:** 2025-07-25T15:27:28.035Z
- **Modified:** 2026-11-05T21:18:32.113Z

## Who should check

- Anyone running Linux \>= afeee514ce7f4cab605beedd03be71ebaf0c5fc8, \< d8a6853d00fbaa810765c8ed2f452a5832273968; \>= afeee514ce7f4cab605beedd03be71ebaf0c5fc8, \< 12b00ec99624f8da8c325f2dd6e807df26df0025; \>= afeee514ce7f4cab605beedd03be71ebaf0c5fc8, \< 48da050b4f54ed639b66278d0ae6f4107b2c4e2d; \>= afeee514ce7f4cab605beedd03be71ebaf0c5fc8, \< 5f35e48b76655e45522df338876dfef88dafcc71; \>= afeee514ce7f4cab605beedd03be71ebaf0c5fc8, \< df5894014a92ff0196dbc212a7764e97366fd2b7; \>= afeee514ce7f4cab605beedd03be71ebaf0c5fc8, \< 776e6186dc9ecbdb8a1b706e989166c8a99bbf64; \>= afeee514ce7f4cab605beedd03be71ebaf0c5fc8, \< 61fd5e93006cf82ec8ee5c115ab5cf4bbd104bdb; \>= afeee514ce7f4cab605beedd03be71ebaf0c5fc8, \< d67ed2ccd2d1dcfda9292c0ea8697a9d0f2f0d98
- Anyone running Linux 4.18

## Description

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

md/raid1: Fix stack memory use after return in raid1\_reshape

In the raid1\_reshape function, newpool is
allocated on the stack and assigned to conf-\>r1bio\_pool.
This results in conf-\>r1bio\_pool.wait.head pointing
to a stack address.
Accessing this address later can lead to a kernel panic.

Example access path:

raid1\_reshape()
{
	// newpool is on the stack
	mempool\_t newpool, oldpool;
	// initialize newpool.wait.head to stack address
	mempool\_init(&newpool, ...);
	conf-\>r1bio\_pool = newpool;
}

raid1\_read\_request() or raid1\_write\_request()
{
	alloc\_r1bio()
	{
		mempool\_alloc()
		{
			// if pool-\>alloc fails
			remove\_element()
			{
				--pool-\>curr\_nr;
			}
		}
	}
}

mempool\_free()
{
	if (pool-\>curr\_nr \< pool-\>min\_nr) {
		// pool-\>wait.head is a stack address
		// wake\_up() will try to access this invalid address
		// which leads to a kernel panic
		return;
		wake\_up(&pool-\>wait);
	}
}

Fix:
reinit conf-\>r1bio\_pool.wait after assigning newpool.

## Affected and fixed versions

- Linux: \>= afeee514ce7f4cab605beedd03be71ebaf0c5fc8, \< d8a6853d00fbaa810765c8ed2f452a5832273968; \>= afeee514ce7f4cab605beedd03be71ebaf0c5fc8, \< 12b00ec99624f8da8c325f2dd6e807df26df0025; \>= afeee514ce7f4cab605beedd03be71ebaf0c5fc8, \< 48da050b4f54ed639b66278d0ae6f4107b2c4e2d; \>= afeee514ce7f4cab605beedd03be71ebaf0c5fc8, \< 5f35e48b76655e45522df338876dfef88dafcc71; \>= afeee514ce7f4cab605beedd03be71ebaf0c5fc8, \< df5894014a92ff0196dbc212a7764e97366fd2b7; \>= afeee514ce7f4cab605beedd03be71ebaf0c5fc8, \< 776e6186dc9ecbdb8a1b706e989166c8a99bbf64; \>= afeee514ce7f4cab605beedd03be71ebaf0c5fc8, \< 61fd5e93006cf82ec8ee5c115ab5cf4bbd104bdb; \>= afeee514ce7f4cab605beedd03be71ebaf0c5fc8, \< d67ed2ccd2d1dcfda9292c0ea8697a9d0f2f0d98 (cvelist)
- Linux: 4.18 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-38445. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-38445.md
Affected: Linux >= afeee514ce7f4cab605beedd03be71ebaf0c5fc8, < d8a6853d00fbaa810765c8ed2f452a5832273968; >= afeee514ce7f4cab605beedd03be71ebaf0c5fc8, < 12b00ec99624f8da8c325f2dd6e807df26df0025; >= afeee514ce7f4cab605beedd03be71ebaf0c5fc8, < 48da050b4f54ed639b66278d0ae6f4107b2c4e2d; >= afeee514ce7f4cab605beed…
Fixed in: Linux 12b00ec99624f8da8c325f2dd6e807df26df0025, Linux 48da050b4f54ed639b66278d0ae6f4107b2c4e2d, Linux 5f35e48b76655e45522df338876dfef88dafcc71, Linux 776e6186dc9ecbdb8a1b706e989166c8a99bbf64, Linux 61fd5e93006cf82ec8ee5c115ab5cf4bbd104bdb

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-38445 being exploited?

There is no confirmed exploitation: CVE-2025-38445 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.29% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-38445?

High: CVSS 7.1 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-38445?

Linux \>= afeee514ce7f4cab605beedd03be71ebaf0c5fc8, \< d8a6853d00fbaa810765c8ed2f452a5832273968; \>= afeee514ce7f4cab605beedd03be71ebaf0c5fc8, \< 12b00ec99624f8da8c325f2dd6e807df26df0025; \>= afeee514ce7f4cab605beedd03be71ebaf0c5fc8, \< 48da050b4f54ed639b66278d0ae6f4107b2c4e2d; \>= afeee514ce7f4cab605beedd03be71ebaf0c5fc8, \< 5f35e48b76655e45522df338876dfef88dafcc71; \>= afeee514ce7f4cab605beedd03be71ebaf0c5fc8, \< df5894014a92ff0196dbc212a7764e97366fd2b7; \>= afeee514ce7f4cab605beedd03be71ebaf0c5fc8, \< 776e6186dc9ecbdb8a1b706e989166c8a99bbf64; \>= afeee514ce7f4cab605beedd03be71ebaf0c5fc8, \< 61fd5e93006cf82ec8ee5c115ab5cf4bbd104bdb; \>= afeee514ce7f4cab605beedd03be71ebaf0c5fc8, \< d67ed2ccd2d1dcfda9292c0ea8697a9d0f2f0d98; Linux 4.18.

### Is there a fix for CVE-2025-38445?

Yes. Fixed in Linux 12b00ec99624f8da8c325f2dd6e807df26df0025, Linux 48da050b4f54ed639b66278d0ae6f4107b2c4e2d, Linux 5f35e48b76655e45522df338876dfef88dafcc71, Linux 776e6186dc9ecbdb8a1b706e989166c8a99bbf64, Linux 61fd5e93006cf82ec8ee5c115ab5cf4bbd104bdb. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2025-38445?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/d8a6853d00fbaa810765c8ed2f452a5832273968>
- patch: <https://git.kernel.org/stable/c/12b00ec99624f8da8c325f2dd6e807df26df0025>
- patch: <https://git.kernel.org/stable/c/48da050b4f54ed639b66278d0ae6f4107b2c4e2d>
- patch: <https://git.kernel.org/stable/c/5f35e48b76655e45522df338876dfef88dafcc71>
- patch: <https://git.kernel.org/stable/c/df5894014a92ff0196dbc212a7764e97366fd2b7>
- patch: <https://git.kernel.org/stable/c/776e6186dc9ecbdb8a1b706e989166c8a99bbf64>
- patch: <https://git.kernel.org/stable/c/61fd5e93006cf82ec8ee5c115ab5cf4bbd104bdb>
- patch: <https://git.kernel.org/stable/c/d67ed2ccd2d1dcfda9292c0ea8697a9d0f2f0d98>
- other: <https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html>
- other: <https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-38445>

HTML: <https://flawdb.com/CVE-2025-38445> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-38445>
