{"id":"CVE-2023-53694","aliases":["CVE-2023-53694"],"related":[],"kind":"vulnerability","state":"published","title":"riscv: ftrace: Fixup panic by disabling preemption","summary":"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? ------------> preempted\n\t\t\t\t\t...\n\t\t\t\tchange ftrace function\n\t\t\t\t\t...\np|      jalr    -?(ra) <------------- switched back\np|      REG_L   ra, -SZREG(sp)\nfunc:\n\txxx\n\tret","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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? ------------> preempted\n\t\t\t\t\t...\n\t\t\t\tchange ftrace function\n\t\t\t\t\t...\np|      jalr    -?(ra) <------------- switched back\np|      REG_L   ra, -SZREG(sp)\nfunc:\n\txxx\n\tret","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nriscv: ftrace: Corregir pánico deshabilitando la preemption\n\nEn RISCV, debemos usar un par AUIPC + JALR para codificar un inmediato, formando un salto que salta a una dirección de más de 4K. Esto puede causar errores si queremos habilitar la preemption del kernel y eliminar la dependencia de parchear código con stop_machine(). Por ejemplo, si una tarea fue conmutada en auipc. Y, si cambiamos la función ftrace antes de que fuera conmutada de nuevo, entonces saltaría a una dirección que tiene bits 11:0 actualizados mezclándose con la parte XLEN:12 anterior.\n\np: área parcheada realizada por ftrace dinámico\nftrace_prologue:\np|      REG_S   ra, -SZREG(sp)\np|      auipc   ra, 0x? ------------> interrumpida\n\t\t\t\t\t...\n\t\t\t\tcambiar función ftrace\n\t\t\t\t\t...\np|      jalr    -?(ra)   <-  ------------ conmutada de nuevo\np|      REG_L   ra, -SZREG(sp)\nfunc:\n\txxx\n\tret","source":"nvd"}],"published":"2025-10-22T13:23:35.869Z","modified":"2026-10-28T19:10:00.193Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"afc76b8b80112189b6f11e67e19cf58301944814","fixed":"84cfcf240f4a577733b1d98fcd2611a611612b03","status":"affected"},{"type":"git","introduced":"afc76b8b80112189b6f11e67e19cf58301944814","fixed":"20a7510e781084364691b4962de31de758194cc9","status":"affected"},{"type":"git","introduced":"afc76b8b80112189b6f11e67e19cf58301944814","fixed":"8547649981e6631328cd64f583667501ae385531","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.12","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.12","status":"unaffected"},{"type":"semver","introduced":"6.1.23","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.2.3","lastAffected":"6.2.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.3","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/84cfcf240f4a577733b1d98fcd2611a611612b03","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/20a7510e781084364691b4962de31de758194cc9","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8547649981e6631328cd64f583667501ae385531","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-53694","url":"https://www.cve.org/CVERecord?id=CVE-2023-53694","licence":"CVE Terms of Use","modified":"2026-05-11T19:50:02.971Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-53694","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-53694","licence":"Public domain","modified":"2026-10-28T19:10:00.193Z"}],"updatedAt":"2026-11-25T22:58:35.011Z","epss":{"score":0.00211,"percentile":0.12119,"date":"2026-12-01T12:00:22.000Z"}}