{"id":"CVE-2023-52504","aliases":["CVE-2023-52504"],"related":[],"kind":"vulnerability","state":"published","title":"x86/alternatives: Disable KASAN in apply_alternatives()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nx86/alternatives: Disable KASAN in apply_alternatives()\n\nFei has reported that KASAN triggers during apply_alternatives() on\na 5-level paging machine:\n\n\tBUG: KASAN: out-of-bounds in rcu_is_watching()\n\tRead of size 4 at addr ff110003ee6419a0 by task swapper/0/0\n\t...\n\t__asan_load4()\n\trcu_is_watching()\n\ttrace_hardirqs_on()\n\ttext_poke_early()\n\tapply_alternatives()\n\t...\n\nOn machines with 5-level paging, cpu_feature_enabled(X86_FEATURE_LA57)\ngets patched. It includes KASAN code, where KASAN_SHADOW_START depends on\n__VIRTUAL_MASK_SHIFT, which is defined with cpu_feature_enabled().\n\nKASAN gets confused when apply_alternatives() patches the\nKASAN_SHADOW_START users. A test patch that makes KASAN_SHADOW_START\nstatic, by replacing __VIRTUAL_MASK_SHIFT with 56, works around the issue.\n\nFix it for real by disabling KASAN while the kernel is patching alternatives.\n\n[ mingo: updated the changelog ]","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nx86/alternatives: Disable KASAN in apply_alternatives()\n\nFei has reported that KASAN triggers during apply_alternatives() on\na 5-level paging machine:\n\n\tBUG: KASAN: out-of-bounds in rcu_is_watching()\n\tRead of size 4 at addr ff110003ee6419a0 by task swapper/0/0\n\t...\n\t__asan_load4()\n\trcu_is_watching()\n\ttrace_hardirqs_on()\n\ttext_poke_early()\n\tapply_alternatives()\n\t...\n\nOn machines with 5-level paging, cpu_feature_enabled(X86_FEATURE_LA57)\ngets patched. It includes KASAN code, where KASAN_SHADOW_START depends on\n__VIRTUAL_MASK_SHIFT, which is defined with cpu_feature_enabled().\n\nKASAN gets confused when apply_alternatives() patches the\nKASAN_SHADOW_START users. A test patch that makes KASAN_SHADOW_START\nstatic, by replacing __VIRTUAL_MASK_SHIFT with 56, works around the issue.\n\nFix it for real by disabling KASAN while the kernel is patching alternatives.\n\n[ mingo: updated the changelog ]","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se resolvió la siguiente vulnerabilidad: x86/alternatives: deshabilite KASAN en apply_alternatives() Fei ha informado que KASAN se activa durante apply_alternatives() en una máquina de paginación de 5 niveles: ERROR: KASAN: fuera de los límites en rcu_is_watching() Lectura de tamaño 4 en la dirección ff110003ee6419a0 mediante task swapper/0/0 ... __asan_load4() rcu_is_watching() trace_hardirqs_on() text_poke_early() apply_alternatives() ... En máquinas con paginación de 5 niveles, cpu_feature_enabled(X86_FEATURE_LA57) se parchea. Incluye código KASAN, donde KASAN_SHADOW_START depende de __VIRTUAL_MASK_SHIFT, que se define con cpu_feature_enabled(). KASAN se confunde cuando apply_alternatives() parchea a los usuarios de KASAN_SHADOW_START. Un parche de prueba que hace que KASAN_SHADOW_START sea estático, reemplazando __VIRTUAL_MASK_SHIFT con 56, soluciona el problema. Solucionelo de verdad deshabilitando KASAN mientras el kernel parchea alternativas. [mingo: actualizó el registro de cambios]","source":"nvd"}],"published":"2024-03-02T21:52:18.500Z","modified":"2026-06-17T06:42:52.927Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","score":7.1,"rating":"HIGH"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","score":7.1,"rating":"HIGH"}],"cwes":["CWE-125"],"affected":[{"ranges":[{"type":"git","introduced":"6657fca06e3ffab8d0b3f9d8b397f5ee498952d7","fixed":"3719d3c36aa853d5a2401af9f8d6b116c91ad5ae","status":"affected"},{"type":"git","introduced":"6657fca06e3ffab8d0b3f9d8b397f5ee498952d7","fixed":"3770c38cd6a60494da29ac2da73ff8156440a2d1","status":"affected"},{"type":"git","introduced":"6657fca06e3ffab8d0b3f9d8b397f5ee498952d7","fixed":"6788b10620ca6e98575d1e06e72a8974aad7657e","status":"affected"},{"type":"git","introduced":"6657fca06e3ffab8d0b3f9d8b397f5ee498952d7","fixed":"ecba5afe86f30605eb9dfb7f265a8de0218d4cfc","status":"affected"},{"type":"git","introduced":"6657fca06e3ffab8d0b3f9d8b397f5ee498952d7","fixed":"5b784489c8158518bf7a466bb3cc045b0fb66b4b","status":"affected"},{"type":"git","introduced":"6657fca06e3ffab8d0b3f9d8b397f5ee498952d7","fixed":"cd287cc208dfe6bd6da98e7f88e723209242c9b4","status":"affected"},{"type":"git","introduced":"6657fca06e3ffab8d0b3f9d8b397f5ee498952d7","fixed":"d35652a5fc9944784f6f50a5c979518ff8dacf61","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.17","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.17","status":"unaffected"},{"type":"semver","introduced":"4.19.297","lastAffected":"4.19.*","status":"unaffected"},{"type":"semver","introduced":"5.4.270","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.199","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.136","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.59","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.5.8","lastAffected":"6.5.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.6","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":"4.17","fixed":"4.19.297"},{"status":"affected","introduced":"4.20","fixed":"5.4.270"},{"status":"affected","introduced":"5.5","fixed":"5.10.199"},{"status":"affected","introduced":"5.11","fixed":"5.15.136"},{"status":"affected","introduced":"5.16","fixed":"6.1.59"},{"status":"affected","introduced":"6.2","fixed":"6.5.8"},{"status":"affected","version":"6.6"},{"status":"affected","version":"6.6"},{"status":"affected","version":"6.6"},{"status":"affected","version":"6.6"},{"status":"affected","version":"6.6"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/3719d3c36aa853d5a2401af9f8d6b116c91ad5ae","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/3770c38cd6a60494da29ac2da73ff8156440a2d1","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6788b10620ca6e98575d1e06e72a8974aad7657e","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ecba5afe86f30605eb9dfb7f265a8de0218d4cfc","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/5b784489c8158518bf7a466bb3cc045b0fb66b4b","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/cd287cc208dfe6bd6da98e7f88e723209242c9b4","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d35652a5fc9944784f6f50a5c979518ff8dacf61","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-03-05T22:11:24.462Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-52504","url":"https://www.cve.org/CVERecord?id=CVE-2023-52504","licence":"CVE Terms of Use","modified":"2026-05-11T19:28:35.856Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-52504","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-52504","licence":"Public domain","modified":"2026-06-17T06:42:52.927Z"}],"updatedAt":"2026-11-25T22:58:33.152Z","epss":{"score":0.00275,"percentile":0.2136,"date":"2026-12-01T12:00:22.000Z"}}