{"id":"CVE-2022-50657","summary":"riscv: mm: add missing memcpy in kasan_init","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nriscv: mm: add missing memcpy in kasan_init\n\nHi Atish,\n\nIt seems that the panic is due to the missing memcpy during kasan_init.\nCould you please check whether this patch is helpful?\n\nWhen doing kasan_populate, the new allocated base_pud/base_p4d should\ncontain kasan_early_shadow_{pud, p4d}'s content. Add the missing memcpy\nto avoid page fault when read/write kasan shadow region.\n\nTested on:\n - qemu with sv57 and CONFIG_KASAN on.\n - qemu with sv48 and CONFIG_KASAN on.","modified":"2026-08-12T03:51:26.886854649Z","published":"2025-12-09T01:29:04.968Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50657.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/9f2ac64d6ca60db99132e08628ac2899f956a0ec"},{"type":"WEB","url":"https://git.kernel.org/stable/c/ff0f6becf3a6f817838b6f80a2c9cca43dce0576"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50657.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50657"},{"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":"8fbdccd2b17335e1881a23865e98c63fcc345938"},{"fixed":"ff0f6becf3a6f817838b6f80a2c9cca43dce0576"},{"fixed":"9f2ac64d6ca60db99132e08628ac2899f956a0ec"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50657.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.18.0"},{"fixed":"6.0.7"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50657.json"}}],"schema_version":"1.9.0"}