CVE-2025-38445

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.
CVSS

No CVSS.

Configurations

No configuration.

History

29 Jul 2025, 14:14

Type Values Removed Values Added
Summary
  • (es) En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: md/raid1: Corregir el uso de memoria de la pila después del retorno en raid1_reshape En la función raid1_reshape, newpool se asigna en la pila y a conf-&gt;r1bio_pool. Esto da como resultado que conf-&gt;r1bio_pool.wait.head apunte a una dirección de pila. Acceder a esta dirección más tarde puede provocar un pánico del kernel. Ejemplo de ruta de acceso: raid1_reshape() { // newpool está en la pila mempool_t newpool, oldpool; // inicializar newpool.wait.head en la dirección de la pila mempool_init(&amp;newpool, ...); conf-&gt;r1bio_pool = newpool; } raid1_read_request() o raid1_write_request() { alloc_r1bio() { mempool_alloc() { // si pool-&gt;alloc falla remove_element() { --pool-&gt;curr_nr; } } } } mempool_free() { if (pool-&gt;curr_nr &lt; pool-&gt;min_nr) { // pool-&gt;wait.head es una dirección de pila // wake_up() intentará acceder a esta dirección no válida // lo que genera un pánico del kernel return; wake_up(&amp;pool-&gt;wait); } } Solución: reinicie conf-&gt;r1bio_pool.wait después de asignar newpool.

25 Jul 2025, 16:15

Type Values Removed Values Added
New CVE

Information

Published : 2025-07-25 16:15

Updated : 2025-07-29 14:14


NVD link : CVE-2025-38445

Mitre link : CVE-2025-38445

CVE.ORG link : CVE-2025-38445


JSON object : View

Products Affected

No product.

CWE

No CWE.