In the Linux kernel, the following vulnerability has been resolved:
riscv: Sync efi page table's kernel mappings before switching
The EFI page table is initially created as a copy of the kernel page table. With VMAP_STACK enabled, kernel stacks are allocated in the vmalloc area: if the stack is allocated in a new PGD (one that was not present at the moment of the efi page table creation or not synced in a previous vmalloc fault), the kernel will take a trap when switching to the efi page table when the vmalloc kernel stack is accessed, resulting in a kernel panic.
Fix that by updating the efi kernel mappings before switching to the efi page table.
[
{
"id": "CVE-2022-49004-43915703",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fa7a7d185ef380546b4b1fed6f84f31dbae8cec7",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "pgd_alloc",
"file": "arch/riscv/include/asm/pgalloc.h"
},
"digest": {
"function_hash": "235148724920168912427487037757702680149",
"length": 354.0
},
"signature_type": "Function"
},
{
"id": "CVE-2022-49004-4a54acae",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fa7a7d185ef380546b4b1fed6f84f31dbae8cec7",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "arch/riscv/include/asm/pgalloc.h"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"78388794531214095049923682183644057776",
"85989168431440359647387847769520390123",
"70442868856649406581124519731609392887",
"167863864084142734377041505439505760286",
"232834246587619865916675239161413118831",
"301921879062622841677630468087488848681",
"141944734761208967869090355298873770876",
"173204801785257581608607093118909778089",
"330246708910817385646140434267117872636"
]
},
"signature_type": "Line"
},
{
"id": "CVE-2022-49004-75d4606a",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3f105a742725a1b78766a55169f1d827732e62b8",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "arch/riscv/include/asm/pgalloc.h"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"80052542167557743642803259556237104069",
"85989168431440359647387847769520390123",
"70442868856649406581124519731609392887",
"167863864084142734377041505439505760286",
"232834246587619865916675239161413118831",
"301921879062622841677630468087488848681",
"141944734761208967869090355298873770876",
"173204801785257581608607093118909778089",
"330246708910817385646140434267117872636"
]
},
"signature_type": "Line"
},
{
"id": "CVE-2022-49004-8003beda",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3f105a742725a1b78766a55169f1d827732e62b8",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "arch/riscv/include/asm/efi.h"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"144148680928865791865245889954534156814",
"130525756835473037000142205155262418190",
"148399542491930722060165691816755067796",
"12618210270438362073012983957033673799",
"213500566897654717411387975966748110995",
"268392796911724905095522936996758732109",
"27957317609811861982794090389836952489"
]
},
"signature_type": "Line"
},
{
"id": "CVE-2022-49004-935d24f7",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@96f479383d92944406d4b3f2bc03c2f640def9f1",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "arch/riscv/include/asm/pgalloc.h"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"80052542167557743642803259556237104069",
"85989168431440359647387847769520390123",
"70442868856649406581124519731609392887",
"167863864084142734377041505439505760286",
"232834246587619865916675239161413118831",
"301921879062622841677630468087488848681",
"141944734761208967869090355298873770876",
"173204801785257581608607093118909778089",
"330246708910817385646140434267117872636"
]
},
"signature_type": "Line"
},
{
"id": "CVE-2022-49004-d2879e28",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@96f479383d92944406d4b3f2bc03c2f640def9f1",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "pgd_alloc",
"file": "arch/riscv/include/asm/pgalloc.h"
},
"digest": {
"function_hash": "235148724920168912427487037757702680149",
"length": 354.0
},
"signature_type": "Function"
},
{
"id": "CVE-2022-49004-d4a504f8",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fa7a7d185ef380546b4b1fed6f84f31dbae8cec7",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "arch/riscv/include/asm/efi.h"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"144148680928865791865245889954534156814",
"130525756835473037000142205155262418190",
"148399542491930722060165691816755067796",
"12618210270438362073012983957033673799",
"213500566897654717411387975966748110995",
"268392796911724905095522936996758732109",
"27957317609811861982794090389836952489"
]
},
"signature_type": "Line"
},
{
"id": "CVE-2022-49004-d5d2a785",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@96f479383d92944406d4b3f2bc03c2f640def9f1",
"deprecated": false,
"signature_version": "v1",
"target": {
"file": "arch/riscv/include/asm/efi.h"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"144148680928865791865245889954534156814",
"130525756835473037000142205155262418190",
"148399542491930722060165691816755067796",
"12618210270438362073012983957033673799",
"213500566897654717411387975966748110995",
"268392796911724905095522936996758732109",
"27957317609811861982794090389836952489"
]
},
"signature_type": "Line"
},
{
"id": "CVE-2022-49004-f9a69e34",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3f105a742725a1b78766a55169f1d827732e62b8",
"deprecated": false,
"signature_version": "v1",
"target": {
"function": "pgd_alloc",
"file": "arch/riscv/include/asm/pgalloc.h"
},
"digest": {
"function_hash": "235148724920168912427487037757702680149",
"length": 354.0
},
"signature_type": "Function"
}
]