CVE-2022-50657

Source
https://cve.org/CVERecord?id=CVE-2022-50657
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50657.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2022-50657
Downstream
Published
2025-12-09T01:29:04.968Z
Modified
2026-03-10T21:51:11.124662Z
Summary
riscv: mm: add missing memcpy in kasan_init
Details

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 kasanpopulate, the new allocated basepud/basep4d should contain kasanearlyshadow{pud, p4d}'s content. Add the missing memcpy to avoid page fault when read/write kasan shadow region.

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

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50657.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / 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

Affected versions

v5.*
v5.17
v5.17-rc2
v5.17-rc3
v5.17-rc4
v5.17-rc5
v5.17-rc6
v5.17-rc7
v5.17-rc8
v5.18
v5.18-rc1
v5.18-rc2
v5.18-rc3
v5.18-rc4
v5.18-rc5
v5.18-rc6
v5.18-rc7
v5.19
v5.19-rc1
v5.19-rc2
v5.19-rc3
v5.19-rc4
v5.19-rc5
v5.19-rc6
v5.19-rc7
v5.19-rc8
v6.*
v6.0
v6.0-rc1
v6.0-rc2
v6.0-rc3
v6.0-rc4
v6.0-rc5
v6.0-rc6
v6.0-rc7
v6.0.1
v6.0.2
v6.0.3
v6.0.4
v6.0.5
v6.0.6
v6.1-rc1

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50657.json"

Linux / Kernel

Package

Name
Kernel

Affected 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"