In the Linux kernel, the following vulnerability has been resolved:
efi: fix potential NULL deref in efimemreserve_persistent
When iterating on a linked list, a result of memremap is dereferenced without checking it for NULL.
This patch adds a check that falls back on allocating a new page in case memremap doesn't succeed.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
[ardb: return -ENOMEM instead of breaking out of the loop]
[
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a2e6a9ff89f13666a1c3ff7195612ab949ea9afc",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2023-52976-2f08647b",
"target": {
"function": "efi_mem_reserve_persistent",
"file": "drivers/firmware/efi/efi.c"
},
"digest": {
"length": 1174.0,
"function_hash": "38281249752017780931941169601858754373"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@87d4ff18738fd71e7e3c10827c80257da6283697",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2023-52976-488cae8c",
"target": {
"file": "drivers/firmware/efi/efi.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"231741264981091275426194016157743341399",
"179112257788154769408949149434311035513",
"219790428246276556965627560442801239382",
"212681513335770743327289023345760655970"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@966d47e1f27c45507c5df82b2a2157e5a4fd3909",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2023-52976-53047b87",
"target": {
"function": "efi_mem_reserve_persistent",
"file": "drivers/firmware/efi/efi.c"
},
"digest": {
"length": 1174.0,
"function_hash": "38281249752017780931941169601858754373"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d8fc0b5fb3e816a4a8684bcd3ed02cbef0fce23c",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2023-52976-75b2558c",
"target": {
"function": "efi_mem_reserve_persistent",
"file": "drivers/firmware/efi/efi.c"
},
"digest": {
"length": 1174.0,
"function_hash": "38281249752017780931941169601858754373"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@87d4ff18738fd71e7e3c10827c80257da6283697",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2023-52976-a2adcb7f",
"target": {
"function": "efi_mem_reserve_persistent",
"file": "drivers/firmware/efi/efi.c"
},
"digest": {
"length": 1174.0,
"function_hash": "38281249752017780931941169601858754373"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a2e6a9ff89f13666a1c3ff7195612ab949ea9afc",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2023-52976-bd0dc740",
"target": {
"file": "drivers/firmware/efi/efi.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"231741264981091275426194016157743341399",
"179112257788154769408949149434311035513",
"219790428246276556965627560442801239382",
"212681513335770743327289023345760655970"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d92a25627bcdf264183670da73c9a60c0bac327e",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2023-52976-bf9aef4b",
"target": {
"function": "efi_mem_reserve_persistent",
"file": "drivers/firmware/efi/efi.c"
},
"digest": {
"length": 1174.0,
"function_hash": "38281249752017780931941169601858754373"
},
"signature_type": "Function"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d8fc0b5fb3e816a4a8684bcd3ed02cbef0fce23c",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2023-52976-bfe9a80c",
"target": {
"file": "drivers/firmware/efi/efi.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"231741264981091275426194016157743341399",
"179112257788154769408949149434311035513",
"219790428246276556965627560442801239382",
"212681513335770743327289023345760655970"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@966d47e1f27c45507c5df82b2a2157e5a4fd3909",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2023-52976-cdb0fd72",
"target": {
"file": "drivers/firmware/efi/efi.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"231741264981091275426194016157743341399",
"179112257788154769408949149434311035513",
"219790428246276556965627560442801239382",
"212681513335770743327289023345760655970"
]
},
"signature_type": "Line"
},
{
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d92a25627bcdf264183670da73c9a60c0bac327e",
"signature_version": "v1",
"deprecated": false,
"id": "CVE-2023-52976-e9ae8bd0",
"target": {
"file": "drivers/firmware/efi/efi.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"231741264981091275426194016157743341399",
"179112257788154769408949149434311035513",
"219790428246276556965627560442801239382",
"212681513335770743327289023345760655970"
]
},
"signature_type": "Line"
}
]