# CVE-2022-50657: riscv: mm: add missing memcpy in kasan_init

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.24%, higher than 16% of CVEs (2026-12-02)
- Published: 2025-12-09T01:29:04.968Z
- Modified: 2026-11-10T12:10:00.177Z
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

riscv: mm: add missing memcpy in kasan_init

Hi Atish,

It seems that the panic is due to the missing memcpy during kasan_init.
Could you please check whether this patch is helpful?

When doing kasan_populate, the new allocated base_pud/base_p4d should
contain kasan_early_shadow_{pud, p4d}'s content. Add the missing memcpy
to avoid page fault when read/write kasan shadow region.

Tested on:
 - qemu with sv57 and CONFIG_KASAN on.
 - qemu with sv48 and CONFIG_KASAN on.

(As written by CVE List.)

## Affected

- Linux Linux: from 8fbdccd2b17335e1881a23865e98c63fcc345938 before ff0f6becf3a6f817838b6f80a2c9cca43dce0576; from 8fbdccd2b17335e1881a23865e98c63fcc345938 before 9f2ac64d6ca60db99132e08628ac2899f956a0ec; 5.18 (not affected: before 5.18; from 6.0.7 up to 6.0.*; from 6.1 up to *)

## References

- <https://git.kernel.org/stable/c/ff0f6becf3a6f817838b6f80a2c9cca43dce0576>
- <https://git.kernel.org/stable/c/9f2ac64d6ca60db99132e08628ac2899f956a0ec>

## Sources

- CVE List: [CVE-2022-50657](https://www.cve.org/CVERecord?id=CVE-2022-50657), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2022-50657](https://nvd.nist.gov/vuln/detail/CVE-2022-50657), Public domain, modified 2026-11-10

---

Page: https://cve.day/CVE-2022-50657 · Whole record: https://cve.day/CVE-2022-50657.json · Rebuilt by cve.day 2026-11-25T22:58:21.307Z
