{"id":"CVE-2025-38434","published":"2025-07-25T14:32:08Z","modified":"2026-08-05T12:01:51Z","title":"Revert \"riscv: Define TASK_SIZE_MAX for __access_ok()\"","vendor":"Linux","product":"Linux","tier":"tail","description":{"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00202,"percentile":0.10175,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/fe30c30bf3bb68d4a4d8c7c814769857b5c973e6","tags":[]},{"url":"https://git.kernel.org/stable/c/f8b1898748dfeb4f9b67b6a6d661f354b9de3523","tags":[]},{"url":"https://git.kernel.org/stable/c/890ba5be6335dbbbc99af14ea007befb5f83f174","tags":[]}],"priority":{"score":7.5,"factors":[{"name":"EPSS percentile","points":2.03},{"name":"CVSS severity","points":5.46}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= ad5643cf2f699989daa85d909403febd6712fccb, < fe30c30bf3bb68d4a4d8c7c814769857b5c973e6",">= ad5643cf2f699989daa85d909403febd6712fccb, < f8b1898748dfeb4f9b67b6a6d661f354b9de3523",">= ad5643cf2f699989daa85d909403febd6712fccb, < 890ba5be6335dbbbc99af14ea007befb5f83f174"]},{"vendor":"Linux","product":"Linux","versions":["6.10"]}],"euvd":{"id":"EUVD-2025-22712","exploited":false,"provenance":"source"}}