{"id":"CVE-2025-22036","aliases":["CVE-2025-22036"],"related":[],"kind":"vulnerability","state":"published","title":"exfat: fix random stack corruption after get_block","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nexfat: fix random stack corruption after get_block\n\nWhen get_block is called with a buffer_head allocated on the stack, such\nas do_mpage_readpage, stack corruption due to buffer_head UAF may occur in\nthe following race condition situation.\n\n     <CPU 0>                      <CPU 1>\nmpage_read_folio\n  <<bh on stack>>\n  do_mpage_readpage\n    exfat_get_block\n      bh_read\n        __bh_read\n\t  get_bh(bh)\n          submit_bh\n          wait_on_buffer\n                              ...\n                              end_buffer_read_sync\n                                __end_buffer_read_notouch\n                                   unlock_buffer\n          <<keep going>>\n        ...\n      ...\n    ...\n  ...\n<<bh is not valid out of mpage_read_folio>>\n   .\n   .\nanother_function\n  <<variable A on stack>>\n                                   put_bh(bh)\n                                     atomic_dec(bh->b_count)\n  * stack corruption here *\n\nThis patch returns -EAGAIN if a folio does not have buffers when bh_read\nneeds to be called. By doing this, the caller can fallback to functions\nlike block_read_full_folio(), create a buffer_head in the folio, and then\ncall get_block again.\n\nLet's do not call bh_read() with on-stack buffer_head.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nexfat: fix random stack corruption after get_block\n\nWhen get_block is called with a buffer_head allocated on the stack, such\nas do_mpage_readpage, stack corruption due to buffer_head UAF may occur in\nthe following race condition situation.\n\n     <CPU 0>                      <CPU 1>\nmpage_read_folio\n  <<bh on stack>>\n  do_mpage_readpage\n    exfat_get_block\n      bh_read\n        __bh_read\n\t  get_bh(bh)\n          submit_bh\n          wait_on_buffer\n                              ...\n                              end_buffer_read_sync\n                                __end_buffer_read_notouch\n                                   unlock_buffer\n          <<keep going>>\n        ...\n      ...\n    ...\n  ...\n<<bh is not valid out of mpage_read_folio>>\n   .\n   .\nanother_function\n  <<variable A on stack>>\n                                   put_bh(bh)\n                                     atomic_dec(bh->b_count)\n  * stack corruption here *\n\nThis patch returns -EAGAIN if a folio does not have buffers when bh_read\nneeds to be called. By doing this, the caller can fallback to functions\nlike block_read_full_folio(), create a buffer_head in the folio, and then\ncall get_block again.\n\nLet's do not call bh_read() with on-stack buffer_head.","source":"cvelist"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2025-04-16T14:11:54.916Z","modified":"2026-08-05T11:56:08.974Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7,"rating":"HIGH"}],"cwes":["CWE-362","CWE-416"],"affected":[{"ranges":[{"type":"git","introduced":"11a347fb6cef62ce47e84b97c45f2b2497c7593b","fixed":"49b0a6ab8e528a0c1c50e37cef9b9c7c121365f2","status":"affected"},{"type":"git","introduced":"11a347fb6cef62ce47e84b97c45f2b2497c7593b","fixed":"f7447286363dc1e410bf30b87d75168f3519f9cc","status":"affected"},{"type":"git","introduced":"11a347fb6cef62ce47e84b97c45f2b2497c7593b","fixed":"f807a6bf2005740fa26b4f59c4a003dc966b9afd","status":"affected"},{"type":"git","introduced":"11a347fb6cef62ce47e84b97c45f2b2497c7593b","fixed":"1bb7ff4204b6d4927e982cd256286c09ed4fd8ca","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.8","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.8","status":"unaffected"},{"type":"semver","introduced":"6.12.23","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.13.11","lastAffected":"6.13.*","status":"unaffected"},{"type":"semver","introduced":"6.14.2","lastAffected":"6.14.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.15","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"6.8","fixed":"6.12.23"},{"status":"affected","introduced":"6.13","fixed":"6.13.11"},{"status":"affected","introduced":"6.14","fixed":"6.14.2"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/49b0a6ab8e528a0c1c50e37cef9b9c7c121365f2","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f7447286363dc1e410bf30b87d75168f3519f9cc","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f807a6bf2005740fa26b4f59c4a003dc966b9afd","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/1bb7ff4204b6d4927e982cd256286c09ed4fd8ca","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2025-10-01T17:04:29.794Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-22036","url":"https://www.cve.org/CVERecord?id=CVE-2025-22036","licence":"CVE Terms of Use","modified":"2026-08-05T11:56:08.974Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-22036","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-22036","licence":"Public domain","modified":"2026-07-30T06:22:04.710Z"}],"updatedAt":"2026-11-25T22:58:56.577Z","epss":{"score":0.00203,"percentile":0.10862,"date":"2026-12-01T12:00:22.000Z"}}