{"id":"CVE-2023-53694","state":"PUBLISHED","title":"riscv: ftrace: Fixup panic by disabling preemption","description":"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","publishedAt":"2025-10-22T13:23:35.869Z","updatedAt":"2026-05-11T19:50:02.971Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"afc76b8b80112189b6f11e67e19cf58301944814","status":"affected","lessThan":"84cfcf240f4a577733b1d98fcd2611a611612b03","versionType":"git"},{"version":"afc76b8b80112189b6f11e67e19cf58301944814","status":"affected","lessThan":"20a7510e781084364691b4962de31de758194cc9","versionType":"git"},{"version":"afc76b8b80112189b6f11e67e19cf58301944814","status":"affected","lessThan":"8547649981e6631328cd64f583667501ae385531","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/riscv/Kconfig"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.12","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.12","versionType":"semver"},{"version":"6.1.23","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.2.3","status":"unaffected","lessThanOrEqual":"6.2.*","versionType":"semver"},{"version":"6.3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/riscv/Kconfig"]}],"references":["https://git.kernel.org/stable/c/84cfcf240f4a577733b1d98fcd2611a611612b03","https://git.kernel.org/stable/c/20a7510e781084364691b4962de31de758194cc9","https://git.kernel.org/stable/c/8547649981e6631328cd64f583667501ae385531"],"weaknesses":[],"ingestedAt":"2026-10-29T20:06:33.064Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2023/53xxx/CVE-2023-53694.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2023-53694","state":"PUBLISHED","datePublished":"2025-10-22T13:23:35.869Z","dateUpdated":"2026-05-11T19:50:02.971Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-10-22T13:21:37.344Z"},"containers":{"cna":{"title":"riscv: ftrace: Fixup panic by disabling preemption","descriptions":[{"lang":"en","value":"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"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"afc76b8b80112189b6f11e67e19cf58301944814","status":"affected","lessThan":"84cfcf240f4a577733b1d98fcd2611a611612b03","versionType":"git"},{"version":"afc76b8b80112189b6f11e67e19cf58301944814","status":"affected","lessThan":"20a7510e781084364691b4962de31de758194cc9","versionType":"git"},{"version":"afc76b8b80112189b6f11e67e19cf58301944814","status":"affected","lessThan":"8547649981e6631328cd64f583667501ae385531","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/riscv/Kconfig"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.12","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.12","versionType":"semver"},{"version":"6.1.23","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.2.3","status":"unaffected","lessThanOrEqual":"6.2.*","versionType":"semver"},{"version":"6.3","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["arch/riscv/Kconfig"]}],"references":[{"url":"https://git.kernel.org/stable/c/84cfcf240f4a577733b1d98fcd2611a611612b03"},{"url":"https://git.kernel.org/stable/c/20a7510e781084364691b4962de31de758194cc9"},{"url":"https://git.kernel.org/stable/c/8547649981e6631328cd64f583667501ae385531"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T19:50:02.971Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.12","versionEndExcluding":"6.1.23"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.12","versionEndExcluding":"6.2.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.12","versionEndExcluding":"6.3"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}