riscv: mm: add missing memcpy in kasan_init
Published Dec 9, 2025
No CVSS score
EPSS 0.22%
Description
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.
Affected products
-
Affected
- ≥ , <
- ≥ , <
-
Affected
- 5.18
Unaffected
- ≥ 0, < 5.18
- ≥ 6.0.7, ≤ 6.0.*
- 6.1
No data.
No data.
Red Hat Enterprise Linux 10
kernel
Not affected
Red Hat Enterprise Linux 6
kernel
Not affected
Red Hat Enterprise Linux 7
kernel
Not affected
Red Hat Enterprise Linux 7
kernel-rt
Not affected
Red Hat Enterprise Linux 8
kernel
Not affected
Red Hat Enterprise Linux 8
kernel-rt
Not affected
Red Hat Enterprise Linux 9
kernel
Not affected
Red Hat Enterprise Linux 9
kernel-rt
Not affected
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Enterprise Linux 10 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 6 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 7 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 7 | kernel-rt | Not affected | n/a |
| Red Hat Enterprise Linux 8 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 8 | kernel-rt | Not affected | n/a |
| Red Hat Enterprise Linux 9 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 9 | kernel-rt | Not affected | n/a |
No package ranges for this CVE.
Remediation
No remediation recorded yet.
No CWE recorded.
References (8)
- https://access.redhat.com/security/cve/CVE-2022-50657 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=2420355 Issue Tracking
- https://euvd.enisa.europa.eu/vulnerability/EUVD-2022-55748 Advisory
- https://git.kernel.org/stable/c/9f2ac64d6ca60db99132e08628ac2899f956a0ec
- https://git.kernel.org/stable/c/ff0f6becf3a6f817838b6f80a2c9cca43dce0576
- https://lore.kernel.org/linux-cve-announce/2025120941-CVE-2022-50657-6582@gregkh/T
- https://nvd.nist.gov/vuln/detail/CVE-2022-50657
- https://www.cve.org/CVERecord?id=CVE-2022-50657
Change history (0)
No recorded changes yet.
CVE.org / MITRE
CISA Vulnrichment
No data
GitHub
No data