CVE-2025-22036
JSON

7.8high

exfat: fix random stack corruption after get_block

Severity
7.8high CVSS:3.1 by Linux
Exploit likelihood
0.20% (higher than 10% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

Description

In the Linux kernel, the following vulnerability has been resolved: exfat: fix random stack corruption after get_block When get_block is called with a buffer_head allocated on the stack, such as do_mpage_readpage, stack corruption due to buffer_head UAF may occur in the following race condition situation. <CPU 0> <CPU 1> mpage_read_folio <<bh on stack>> do_mpage_readpage exfat_get_block bh_read __bh_read get_bh(bh) submit_bh wait_on_buffer ... end_buffer_read_sync __end_buffer_read_notouch unlock_buffer <<keep going>> ... ... ... ... <<bh is not valid out of mpage_read_folio>> . . another_function <<variable A on stack>> put_bh(bh) atomic_dec(bh->b_count) * stack corruption here * This patch returns -EAGAIN if a folio does not have buffers when bh_read needs to be called. By doing this, the caller can fallback to functions like block_read_full_folio(), create a buffer_head in the folio, and then call get_block again. Let's do not call bh_read() with on-stack buffer_head.

Affected

Product or packageVersionsReported by
Linux Linuxfrom 11a347fb6cef62ce47e84b97c45f2b2497c7593b before 49b0a6ab8e528a0c1c50e37cef9b9c7c121365f2, from 11a347fb6cef62ce47e84b97c45f2b2497c7593b before f7447286363dc1e410bf30b87d75168f3519f9cc, from 11a347fb6cef62ce47e84b97c45f2b2497c7593b before f807a6bf2005740fa26b4f59c4a003dc966b9afd, from 11a347fb6cef62ce47e84b97c45f2b2497c7593b before 1bb7ff4204b6d4927e982cd256286c09ed4fd8ca, 6.8
Not affected: before 6.8, from 6.12.23 up to 6.12.*, from 6.13.11 up to 6.13.*, from 6.14.2 up to 6.14.*, from 6.15 up to *
CVE List
linux linux_kernelfrom 6.8 before 6.12.23, from 6.13 before 6.13.11, from 6.14 before 6.14.2NVD

All scores

Linux7.8high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CISA-ADP7.0high CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD7.0high CVSS:3.1CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-362CWE-416

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

In the Linux kernel, the following vulnerability has been resolved: exfat: fix random stack corruption after get_block When get_block is called with a buffer_head allocated on the stack, such as do_mpage_readpage, stack corruption due to buffer_head UAF may occur in the following race condition situation. <CPU 0> <CPU 1> mpage_read_folio <<bh on stack>> do_mpage_readpage exfat_get_block bh_read __bh_read get_bh(bh) submit_bh wait_on_buffer ... end_buffer_read_sync __end_buffer_read_notouch unlock_buffer <<keep going>> ... ... ... ... <<bh is not valid out of mpage_read_folio>> . . another_function <<variable A on stack>> put_bh(bh) atomic_dec(bh->b_count) * stack corruption here * This patch returns -EAGAIN if a folio does not have buffers when bh_read needs to be called. By doing this, the caller can fallback to functions like block_read_full_folio(), create a buffer_head in the folio, and then call get_block again. Let's do not call bh_read() with on-stack buffer_head.

NVD (es)

En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: exfat: corrige la corrupción de pila aleatoria después de get_block Cuando se llama a get_block con un buffer_head asignado en la pila, como do_mpage_readpage, puede ocurrir una corrupción de pila debido a buffer_head UAF en la siguiente situación de condición de ejecución. mpage_read_folio &lt;&gt; do_mpage_readpage exfat_get_block bh_read __bh_read get_bh(bh) submit_bh wait_on_buffer ... end_buffer_read_sync __end_buffer_read_notouch unlock_buffer &lt;&gt; ... ... ... ... &lt;&gt; . . another_function &lt;&gt; put_bh(bh) atomic_dec(bh-&gt;b_count) * Corrupción de pila aquí * Este parche devuelve -EAGAIN si un folio no tiene búferes cuando se necesita llamar a bh_read. De esta manera, quien lo llama puede recurrir a funciones como block_read_full_folio(), crear un buffer_head en el folio y luego volver a llamar a get_block. No llamemos a bh_read() con buffer_head en la pila.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-22036 changed 2026-08-05CVE Terms of Use
NVDCVE-2025-22036 changed 2026-07-30Public domain