riscv: mm: add missing memcpy in kasan_init
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.
- Products
- Kernel
- Affected versions
- Not specified
- Fixed versions
- 6.0.7
- CVEs
- CVE-2022-50657
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 17:23 UTC · Revision 1
Source evidence
riscv: mm: add missing memcpy in kasan_init
core-osv · Original sourcePublished 9 Dec 2025, 01:29 UTC
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.
osv:CVE-2022-50657
Kernel
Fixed versions: 6.0.7
Complete source record
{
"id": "6942cd3b9bf7fc35239f8dde1936f25ef38e6acf7f75dce9a3627ed6275abcc3",
"url": "https://osv.dev/vulnerability/CVE-2022-50657",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "riscv: mm: add missing memcpy in kasan_init",
"summary": "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.",
"evidence": "osv:CVE-2022-50657",
"products": [
{
"name": {
"value": "Kernel",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "6.0.7",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "unknown",
"structured": {
"id": "CVE-2022-50657",
"aliases": [
"CVE-2022-50657"
],
"affected": [
{
"ranges": [
{
"repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
"type": "GIT",
"events": [
{
"introduced": "8fbdccd2b17335e1881a23865e98c63fcc345938"
},
{
"fixed": "ff0f6becf3a6f817838b6f80a2c9cca43dce0576"
},
{
"fixed": "9f2ac64d6ca60db99132e08628ac2899f956a0ec"
}
]
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50657.json"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "5.18.0"
},
{
"fixed": "6.0.7"
}
]
}
],
"package": {
"name": "Kernel",
"ecosystem": "Linux"
},
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50657.json"
}
}
],
"modified": "2026-10-28T02:30:30.645776109Z",
"provider": "osv",
"references": [
"https://git.kernel.org/stable/c/9f2ac64d6ca60db99132e08628ac2899f956a0ec",
"https://git.kernel.org/stable/c/ff0f6becf3a6f817838b6f80a2c9cca43dce0576",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50657.json",
"https://nvd.nist.gov/vuln/detail/CVE-2022-50657",
"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
],
"provider_metadata": {
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50657.json"
}
},
"related_cves": [
{
"value": "CVE-2022-50657",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": null
},
"source_id": "core-osv",
"document_id": 497787,
"published_at": "2025-12-09T01:29:04.968+00:00"
}