CVE-2022-50657

riscv: mm: add missing memcpy in kasan_init

State
Published
Severity
Not scored
Published
Dec 9, 2025
Updated
May 11, 2026
Reserved
Dec 9, 2025

Read the record on cve.org

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.

Scores

The record has no CVSS score.

Weaknesses

The record names no weakness.

Affected Products

ProductVersions
LinuxLinux
  • 8fbdccd2b17335e1881a23865e98c63fcc345938 to before ff0f6becf3a6f817838b6f80a2c9cca43dce0576Affected
  • 8fbdccd2b17335e1881a23865e98c63fcc345938 to before 9f2ac64d6ca60db99132e08628ac2899f956a0ecAffected
LinuxLinux
  • 5.18Affected
  • before 5.18Not affected
  • 6.0.7 through 6.0.*Not affected
  • 6.1 and laterNot affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.