In the Linux kernel, the following vulnerability has been resolved:
net: arcnet: com20020: Fix null-ptr-deref in com20020pci_probe()
During driver initialization, the pointer of card info, i.e. the variable 'ci' is required. However, the definition of 'com20020pciidtable' reveals that this field is empty for some devices, which will cause null pointer dereference when initializing these devices.
The following log reveals it:
[ 3.973806] KASAN: null-ptr-deref in range [0x0000000000000028-0x000000000000002f] [ 3.973819] RIP: 0010:com20020pciprobe+0x18d/0x13e0 [com20020pci] [ 3.975181] Call Trace: [ 3.976208] localpciprobe+0x13f/0x210 [ 3.977248] pcideviceprobe+0x34c/0x6d0 [ 3.977255] ? pciuevent+0x470/0x470 [ 3.978265] reallyprobe+0x24c/0x8d0 [ 3.978273] __driverprobedevice+0x1b3/0x280 [ 3.979288] driverprobedevice+0x50/0x370
Fix this by checking whether the 'ci' is a null pointer first.
{
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/48xxx/CVE-2022-48908.json",
"cna_assigner": "Linux"
}"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-48908.json"
[
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "332802537051689508950231893013854322411",
"length": 3681.0
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e50c589678e50f8d574612e473ca60ef45190896",
"signature_type": "Function",
"id": "CVE-2022-48908-0a3877f9",
"target": {
"file": "drivers/net/arcnet/com20020-pci.c",
"function": "com20020pci_probe"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"153885276482793925858248328759453160496",
"111285832449394250061506765352159165855",
"260721284477559370997601838975008010226",
"89820787810148867234215491543280394036"
]
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bd6f1fd5d33dfe5d1b4f2502d3694a7cc13f166d",
"signature_type": "Line",
"id": "CVE-2022-48908-1ec5f45e",
"target": {
"file": "drivers/net/arcnet/com20020-pci.c"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"153885276482793925858248328759453160496",
"111285832449394250061506765352159165855",
"260721284477559370997601838975008010226",
"84943511836682773057661116002353139793"
]
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e50c589678e50f8d574612e473ca60ef45190896",
"signature_type": "Line",
"id": "CVE-2022-48908-58f60c6f",
"target": {
"file": "drivers/net/arcnet/com20020-pci.c"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"153885276482793925858248328759453160496",
"111285832449394250061506765352159165855",
"260721284477559370997601838975008010226",
"84943511836682773057661116002353139793"
]
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b838add93e1dd98210482dc433768daaf752bdef",
"signature_type": "Line",
"id": "CVE-2022-48908-85dae194",
"target": {
"file": "drivers/net/arcnet/com20020-pci.c"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "123094756402692316202725614980821534187",
"length": 3403.0
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8e3bc7c5bbf87e86e9cd652ca2a9166942d86206",
"signature_type": "Function",
"id": "CVE-2022-48908-d851040e",
"target": {
"file": "drivers/net/arcnet/com20020-pci.c",
"function": "com20020pci_probe"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "304536329823733463059590362539064556935",
"length": 3772.0
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bd6f1fd5d33dfe5d1b4f2502d3694a7cc13f166d",
"signature_type": "Function",
"id": "CVE-2022-48908-ea08f82c",
"target": {
"file": "drivers/net/arcnet/com20020-pci.c",
"function": "com20020pci_probe"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"function_hash": "332802537051689508950231893013854322411",
"length": 3681.0
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b838add93e1dd98210482dc433768daaf752bdef",
"signature_type": "Function",
"id": "CVE-2022-48908-f0f5b492",
"target": {
"file": "drivers/net/arcnet/com20020-pci.c",
"function": "com20020pci_probe"
}
},
{
"deprecated": false,
"signature_version": "v1",
"digest": {
"threshold": 0.9,
"line_hashes": [
"153885276482793925858248328759453160496",
"111285832449394250061506765352159165855",
"260721284477559370997601838975008010226",
"84943511836682773057661116002353139793"
]
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8e3bc7c5bbf87e86e9cd652ca2a9166942d86206",
"signature_type": "Line",
"id": "CVE-2022-48908-fc156f16",
"target": {
"file": "drivers/net/arcnet/com20020-pci.c"
}
}
]