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

Status: published. Published: 2025-07-25. Updated: 2026-11-05.

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.

## Remediation

No remediation reported in collected sources

## Affected products and versions

- Linux / Linux: ≥ afeee514ce7f4cab605beedd03be71ebaf0c5fc8; < d8a6853d00fbaa810765c8ed2f452a5832273968 (affected, git); ≥ afeee514ce7f4cab605beedd03be71ebaf0c5fc8; < 12b00ec99624f8da8c325f2dd6e807df26df0025 (affected, git); ≥ afeee514ce7f4cab605beedd03be71ebaf0c5fc8; < 48da050b4f54ed639b66278d0ae6f4107b2c4e2d (affected, git); ≥ afeee514ce7f4cab605beedd03be71ebaf0c5fc8; < 5f35e48b76655e45522df338876dfef88dafcc71 (affected, git); ≥ afeee514ce7f4cab605beedd03be71ebaf0c5fc8; < df5894014a92ff0196dbc212a7764e97366fd2b7 (affected, git); ≥ afeee514ce7f4cab605beedd03be71ebaf0c5fc8; < 776e6186dc9ecbdb8a1b706e989166c8a99bbf64 (affected, git); ≥ afeee514ce7f4cab605beedd03be71ebaf0c5fc8; < 61fd5e93006cf82ec8ee5c115ab5cf4bbd104bdb (affected, git); ≥ afeee514ce7f4cab605beedd03be71ebaf0c5fc8; < d67ed2ccd2d1dcfda9292c0ea8697a9d0f2f0d98 (affected, git). Source: CNA: Linux
- Linux / Linux: 4.18 (affected); ≥ 0; < 4.18 (unaffected, semver); ≥ 5.4.296; ≤ 5.4.* (unaffected, semver); ≥ 5.10.240; ≤ 5.10.* (unaffected, semver); ≥ 5.15.189; ≤ 5.15.* (unaffected, semver); ≥ 6.1.146; ≤ 6.1.* (unaffected, semver); ≥ 6.6.99; ≤ 6.6.* (unaffected, semver); ≥ 6.12.39; ≤ 6.12.* (unaffected, semver); ≥ 6.15.7; ≤ 6.15.* (unaffected, semver); ≥ 6.16; ≤ * (unaffected, original_commit_for_fix). Source: CNA: Linux

## Severity and prioritization

- CISA KEV: No listing in collected sources

- EPSS: 0.20% as of 2026-11-05; percentile 9.84%

- SSVC: exploitation none; automatable no; technical impact partial; source ADP: CISA-ADP

- Weaknesses: Not reported

## Exploit evidence

No exploit evidence in collected sources. This is not proof of no exploitation.

## References

- https://git.kernel.org/stable/c/d8a6853d00fbaa810765c8ed2f452a5832273968 (CNA: Linux)

- https://git.kernel.org/stable/c/12b00ec99624f8da8c325f2dd6e807df26df0025 (CNA: Linux)

- https://git.kernel.org/stable/c/48da050b4f54ed639b66278d0ae6f4107b2c4e2d (CNA: Linux)

- https://git.kernel.org/stable/c/5f35e48b76655e45522df338876dfef88dafcc71 (CNA: Linux)

- https://git.kernel.org/stable/c/df5894014a92ff0196dbc212a7764e97366fd2b7 (CNA: Linux)

- https://git.kernel.org/stable/c/776e6186dc9ecbdb8a1b706e989166c8a99bbf64 (CNA: Linux)

- https://git.kernel.org/stable/c/61fd5e93006cf82ec8ee5c115ab5cf4bbd104bdb (CNA: Linux)

- https://git.kernel.org/stable/c/d67ed2ccd2d1dcfda9292c0ea8697a9d0f2f0d98 (CNA: Linux)

- https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html (ADP: CVE)

- https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html (ADP: CVE)

## Provenance

- CNA: Linux: https://www.cve.org/CVERecord?id=CVE-2025-38445; retrieved 2026-11-05; source updated 2026-11-05

- FIRST EPSS: https://api.first.org/data/v1/epss?cve=CVE-2025-38445; retrieved 2026-11-05; source updated Not reported

Revision: 8b9c3e742da89bb2ba893086c4d2aa5e4b8d6f44cebb309b287f71c368b68f6e

Canonical: https://y2.dev/cve/CVE-2025-38445

## Agent and API access

Public CVE pages, Markdown, and JSON are free to read without an account or API key.

- Public catalog: https://y2.dev/cve/index.json. Follow nextCursor with the same search, filters, sort, and limit (1–100). A null cursor marks the end.

- WebMCP: search_cve_disclosures, get_cve_disclosure, get_cve_page_markdown, get_y2_cve_access. Available in compatible browsers.

- Cyber API: https://api.y2.dev/api/v2/cyber/cves and https://api.y2.dev/api/v2/cyber/cves/{cveId}.

- Y2 Pro or Elite: create a workspace API key with the intel:cyber scope and send Authorization: Bearer <Y2_API_KEY>. Setup: https://y2.dev/docs/api/create-key.

- x402: Pay per request without an account or API key. Omit Authorization, read the HTTP 402 PAYMENT-REQUIRED challenge, validate its current requirements, and retry with PAYMENT-SIGNATURE through an authorized payment client. These browser tools never make payments. Guide: https://y2.dev/docs/api/x402.

- OpenAPI: https://y2.dev/api/openapi.yaml. Agent access metadata: https://y2.dev/cve/agent.json.

Collected public records only. Check source status for coverage and freshness.