{"id":"CVE-2025-38434","aliases":["CVE-2025-38434"],"related":[],"kind":"vulnerability","state":"published","title":"Revert \"riscv: Define TASK_SIZE_MAX for __access_ok()\"","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nRevert \"riscv: Define TASK_SIZE_MAX for __access_ok()\"\n\nThis reverts commit ad5643cf2f69 (\"riscv: Define TASK_SIZE_MAX for\n__access_ok()\").\n\nThis commit changes TASK_SIZE_MAX to be LONG_MAX to optimize access_ok(),\nbecause the previous TASK_SIZE_MAX (default to TASK_SIZE) requires some\ncomputation.\n\nThe reasoning was that all user addresses are less than LONG_MAX, and all\nkernel addresses are greater than LONG_MAX. Therefore access_ok() can\nfilter kernel addresses.\n\nAddresses between TASK_SIZE and LONG_MAX are not valid user addresses, but\naccess_ok() let them pass. That was thought to be okay, because they are\nnot valid addresses at hardware level.\n\nUnfortunately, one case is missed: get_user_pages_fast() happily accepts\naddresses between TASK_SIZE and LONG_MAX. futex(), for instance, uses\nget_user_pages_fast(). This causes the problem reported by Robert [1].\n\nTherefore, revert this commit. TASK_SIZE_MAX is changed to the default:\nTASK_SIZE.\n\nThis unfortunately reduces performance, because TASK_SIZE is more expensive\nto compute compared to LONG_MAX. But correctness first, we can think about\noptimization later, if required.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nRevert \"riscv: Define TASK_SIZE_MAX for __access_ok()\"\n\nThis reverts commit ad5643cf2f69 (\"riscv: Define TASK_SIZE_MAX for\n__access_ok()\").\n\nThis commit changes TASK_SIZE_MAX to be LONG_MAX to optimize access_ok(),\nbecause the previous TASK_SIZE_MAX (default to TASK_SIZE) requires some\ncomputation.\n\nThe reasoning was that all user addresses are less than LONG_MAX, and all\nkernel addresses are greater than LONG_MAX. Therefore access_ok() can\nfilter kernel addresses.\n\nAddresses between TASK_SIZE and LONG_MAX are not valid user addresses, but\naccess_ok() let them pass. That was thought to be okay, because they are\nnot valid addresses at hardware level.\n\nUnfortunately, one case is missed: get_user_pages_fast() happily accepts\naddresses between TASK_SIZE and LONG_MAX. futex(), for instance, uses\nget_user_pages_fast(). This causes the problem reported by Robert [1].\n\nTherefore, revert this commit. TASK_SIZE_MAX is changed to the default:\nTASK_SIZE.\n\nThis unfortunately reduces performance, because TASK_SIZE is more expensive\nto compute compared to LONG_MAX. But correctness first, we can think about\noptimization later, if required.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: Revertir \"riscv: Define TASK_SIZE_MAX for __access_ok()\". Esto revierte el commit ad5643cf2f69 (\"riscv: Define TASK_SIZE_MAX for __access_ok()\"). Este commit cambia TASK_SIZE_MAX a LONG_MAX para optimizar access_ok(), ya que el valor predeterminado de TASK_SIZE_MAX (predeterminado) requiere cálculos. El razonamiento era que todas las direcciones de usuario son menores que LONG_MAX y todas las direcciones de kernel son mayores que LONG_MAX. Por lo tanto, access_ok() puede filtrar direcciones de kernel. Las direcciones entre TASK_SIZE y LONG_MAX no son direcciones de usuario válidas, pero access_ok() las deja pasar. Se consideró que esto era correcto, ya que no son direcciones válidas a nivel de hardware. Desafortunadamente, se omite un caso: get_user_pages_fast() acepta direcciones entre TASK_SIZE y LONG_MAX. futex(), por ejemplo, usa get_user_pages_fast(). Esto causa el problema reportado por Robert [1]. Por lo tanto, revierte este commit . TASK_SIZE_MAX se cambia al valor predeterminado: TASK_SIZE. Lamentablemente, esto reduce el rendimiento, ya que TASK_SIZE es más costoso de calcular que LONG_MAX. Pero primero la corrección; podemos pensar en la optimización más adelante, si es necesario.","source":"nvd"}],"published":"2025-07-25T14:32:08.089Z","modified":"2026-08-05T12:01:51.423Z","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":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"ad5643cf2f699989daa85d909403febd6712fccb","fixed":"fe30c30bf3bb68d4a4d8c7c814769857b5c973e6","status":"affected"},{"type":"git","introduced":"ad5643cf2f699989daa85d909403febd6712fccb","fixed":"f8b1898748dfeb4f9b67b6a6d661f354b9de3523","status":"affected"},{"type":"git","introduced":"ad5643cf2f699989daa85d909403febd6712fccb","fixed":"890ba5be6335dbbbc99af14ea007befb5f83f174","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.10","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.10","status":"unaffected"},{"type":"semver","introduced":"6.12.36","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.15.5","lastAffected":"6.15.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.16","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.10","fixed":"6.12.36"},{"status":"affected","introduced":"6.13","fixed":"6.15.5"},{"status":"affected","version":"6.16"},{"status":"affected","version":"6.16"},{"status":"affected","version":"6.16"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/fe30c30bf3bb68d4a4d8c7c814769857b5c973e6","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f8b1898748dfeb4f9b67b6a6d661f354b9de3523","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/890ba5be6335dbbbc99af14ea007befb5f83f174","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-38434","url":"https://www.cve.org/CVERecord?id=CVE-2025-38434","licence":"CVE Terms of Use","modified":"2026-08-05T12:01:51.423Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-38434","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-38434","licence":"Public domain","modified":"2026-07-30T06:23:14.043Z"}],"updatedAt":"2026-11-25T22:59:01.711Z","epss":{"score":0.00207,"percentile":0.11461,"date":"2026-12-01T12:00:22.000Z"}}