Skip to content
Heist/ feed
Back to feed
UnratedFix available

md/raid1: Fix stack memory use after return in raid1_reshape

Type: advisorySources: OSV

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.

Products
Kernel
Affected versions
Not specified
Fixed versions
5.10.240, 5.15.189, 5.4.296, 6.1.146, 6.12.39, 6.15.7, 6.6.99
CVEs
CVE-2025-38445
Confirmed fixed CVEs
Not specified
Updated in this feed
7 Nov 2026, 02:13 UTC · Revision 1

Source evidence

md/raid1: Fix stack memory use after return in raid1_reshape

core-osv · Original source

Published 25 Jul 2025, 15:27 UTC

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.

osv:CVE-2025-38445

Kernel

Fixed versions: 5.4.296, 5.10.240, 5.15.189, 6.1.146, 6.6.99, 6.12.39, 6.15.7

Complete source record
{
  "id": "85f45ded97337a28308f7205ac9f6eff005d202c0a35fafb03c4f938636795bf",
  "url": "https://osv.dev/vulnerability/CVE-2025-38445",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "md/raid1: Fix stack memory use after return in raid1_reshape",
    "summary": "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.",
    "evidence": "osv:CVE-2025-38445",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.4.296",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.10.240",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.189",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.1.146",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.99",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.12.39",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.15.7",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2025-38445",
      "aliases": [
        "CVE-2025-38445"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "afeee514ce7f4cab605beedd03be71ebaf0c5fc8"
                },
                {
                  "fixed": "d8a6853d00fbaa810765c8ed2f452a5832273968"
                },
                {
                  "fixed": "12b00ec99624f8da8c325f2dd6e807df26df0025"
                },
                {
                  "fixed": "48da050b4f54ed639b66278d0ae6f4107b2c4e2d"
                },
                {
                  "fixed": "5f35e48b76655e45522df338876dfef88dafcc71"
                },
                {
                  "fixed": "df5894014a92ff0196dbc212a7764e97366fd2b7"
                },
                {
                  "fixed": "776e6186dc9ecbdb8a1b706e989166c8a99bbf64"
                },
                {
                  "fixed": "61fd5e93006cf82ec8ee5c115ab5cf4bbd104bdb"
                },
                {
                  "fixed": "d67ed2ccd2d1dcfda9292c0ea8697a9d0f2f0d98"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-38445.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "4.18.0"
                },
                {
                  "fixed": "5.4.296"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.5.0"
                },
                {
                  "fixed": "5.10.240"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "5.15.189"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "6.1.146"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.99"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.12.39"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.15.7"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-38445.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:49.233176179Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/12b00ec99624f8da8c325f2dd6e807df26df0025",
        "https://git.kernel.org/stable/c/48da050b4f54ed639b66278d0ae6f4107b2c4e2d",
        "https://git.kernel.org/stable/c/5f35e48b76655e45522df338876dfef88dafcc71",
        "https://git.kernel.org/stable/c/61fd5e93006cf82ec8ee5c115ab5cf4bbd104bdb",
        "https://git.kernel.org/stable/c/776e6186dc9ecbdb8a1b706e989166c8a99bbf64",
        "https://git.kernel.org/stable/c/d67ed2ccd2d1dcfda9292c0ea8697a9d0f2f0d98",
        "https://git.kernel.org/stable/c/d8a6853d00fbaa810765c8ed2f452a5832273968",
        "https://git.kernel.org/stable/c/df5894014a92ff0196dbc212a7764e97366fd2b7",
        "https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html",
        "https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38445.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-38445",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/38xxx/CVE-2025-38445.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-38445",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 517271,
  "published_at": "2025-07-25T15:27:28.035+00:00"
}