In the Linux kernel, the following vulnerability has been resolved:
riscv: kvm: Fix out-of-bounds array access
In kvmriscvvcpusbiinit() the entry->ext_idx can contain an out-of-bound index. This is used as a special marker for the base extensions, that cannot be disabled. However, when traversing the extensions, that special marker is not checked prior indexing the array.
Add an out-of-bounds check to the function.
[
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "arch/riscv/kvm/vcpu_sbi.c",
"function": "kvm_riscv_vcpu_sbi_init"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3c49e1084a5df99807fc43dd318c491e6cbaa168",
"digest": {
"length": 518.0,
"function_hash": "322321468073605418275030753062715128821"
},
"id": "CVE-2024-53228-6c0f02ed"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "arch/riscv/kvm/vcpu_sbi.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@332fa4a802b16ccb727199da685294f85f9880cb",
"digest": {
"line_hashes": [
"166513889070146691249761306511205658849",
"289136900531474267430378744597390923890",
"67397855268695477924039642369770770338",
"15430766875529091517127996189663030873",
"38597536066512356974618972796661256796",
"308613670487243315440974493275885286128",
"69877086596939596452753195159771827254",
"220881361823384848644788229438502922169",
"201105516025701408582252398410642616653",
"285440976747995740851049189616880751327",
"294869216149707239756563620021178085855",
"261782493527620633789295987137770823464",
"57705152614791030566766848337628134764"
],
"threshold": 0.9
},
"id": "CVE-2024-53228-8656e838"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "arch/riscv/kvm/vcpu_sbi.c",
"function": "kvm_riscv_vcpu_sbi_init"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@332fa4a802b16ccb727199da685294f85f9880cb",
"digest": {
"length": 518.0,
"function_hash": "322321468073605418275030753062715128821"
},
"id": "CVE-2024-53228-adbf8456"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "arch/riscv/kvm/vcpu_sbi.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3c49e1084a5df99807fc43dd318c491e6cbaa168",
"digest": {
"line_hashes": [
"166513889070146691249761306511205658849",
"289136900531474267430378744597390923890",
"67397855268695477924039642369770770338",
"15430766875529091517127996189663030873",
"38597536066512356974618972796661256796",
"308613670487243315440974493275885286128",
"69877086596939596452753195159771827254",
"220881361823384848644788229438502922169",
"201105516025701408582252398410642616653",
"285440976747995740851049189616880751327",
"294869216149707239756563620021178085855",
"261782493527620633789295987137770823464",
"57705152614791030566766848337628134764"
],
"threshold": 0.9
},
"id": "CVE-2024-53228-d38a0f32"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "arch/riscv/kvm/vcpu_sbi.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b1af648f0d610665c956ea4604d9f797e5c7e991",
"digest": {
"line_hashes": [
"166513889070146691249761306511205658849",
"289136900531474267430378744597390923890",
"67397855268695477924039642369770770338",
"15430766875529091517127996189663030873",
"38597536066512356974618972796661256796",
"308613670487243315440974493275885286128",
"69877086596939596452753195159771827254",
"220881361823384848644788229438502922169",
"201105516025701408582252398410642616653",
"285440976747995740851049189616880751327",
"294869216149707239756563620021178085855",
"261782493527620633789295987137770823464",
"57705152614791030566766848337628134764"
],
"threshold": 0.9
},
"id": "CVE-2024-53228-f7464419"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "arch/riscv/kvm/vcpu_sbi.c",
"function": "kvm_riscv_vcpu_sbi_init"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b1af648f0d610665c956ea4604d9f797e5c7e991",
"digest": {
"length": 518.0,
"function_hash": "322321468073605418275030753062715128821"
},
"id": "CVE-2024-53228-ff75c125"
}
]