{"id":"CVE-2023-53694","summary":"riscv: ftrace: Fixup panic by disabling preemption","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nriscv: ftrace: Fixup panic by disabling preemption\n\nIn RISCV, we must use an AUIPC + JALR pair to encode an immediate,\nforming a jump that jumps to an address over 4K. This may cause errors\nif we want to enable kernel preemption and remove dependency from\npatching code with stop_machine(). For example, if a task was switched\nout on auipc. And, if we changed the ftrace function before it was\nswitched back, then it would jump to an address that has updated 11:0\nbits mixing with previous XLEN:12 part.\n\np: patched area performed by dynamic ftrace\nftrace_prologue:\np|      REG_S   ra, -SZREG(sp)\np|      auipc   ra, 0x? ------------\u003e preempted\n\t\t\t\t\t...\n\t\t\t\tchange ftrace function\n\t\t\t\t\t...\np|      jalr    -?(ra) \u003c------------- switched back\np|      REG_L   ra, -SZREG(sp)\nfunc:\n\txxx\n\tret","modified":"2026-04-02T09:44:53.647197Z","published":"2025-10-22T13:23:35.869Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53694.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/20a7510e781084364691b4962de31de758194cc9"},{"type":"WEB","url":"https://git.kernel.org/stable/c/84cfcf240f4a577733b1d98fcd2611a611612b03"},{"type":"WEB","url":"https://git.kernel.org/stable/c/8547649981e6631328cd64f583667501ae385531"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53694.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-53694"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"afc76b8b80112189b6f11e67e19cf58301944814"},{"fixed":"84cfcf240f4a577733b1d98fcd2611a611612b03"},{"fixed":"20a7510e781084364691b4962de31de758194cc9"},{"fixed":"8547649981e6631328cd64f583667501ae385531"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-53694.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.12.0"},{"fixed":"6.1.23"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.2.0"},{"fixed":"6.2.3"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-53694.json"}}],"schema_version":"1.7.5"}