In the Linux kernel, the following vulnerability has been resolved:
kunit/overflow: Fix UB in overflowallocationtest
The 'devicename' array doesn't exist out of the 'overflowallocationtest' function scope. However, it is being used as a driver name when calling 'kunitdrivercreate' from 'kunitdevice_register'. It produces the kernel panic with KASAN enabled.
Since this variable is used in one place only, remove it and pass the device name into kunitdeviceregister directly as an ascii string.
[
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "lib/overflow_kunit.c",
"function": "overflow_allocation_test"
},
"digest": {
"length": 150.0,
"function_hash": "174784423374021099639097640005010280903"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@92e9bac18124682c4b99ede9ee3bcdd68f121e92",
"signature_version": "v1",
"id": "CVE-2024-46823-103e4e24"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "lib/overflow_kunit.c"
},
"digest": {
"line_hashes": [
"24718893345181044107403099244742105933",
"69146277067576128048751509579037879633",
"163730838879666678308731329256796600163",
"278732933810082709840351872082053486380",
"282384388562911526649236247017008987514",
"171841024305180512850877824201414054637",
"96515527235300303631386387249603895029",
"313962626299140084975041189356627104745"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d1207f07decc66546a7fa463d2f335a856c986ef",
"signature_version": "v1",
"id": "CVE-2024-46823-3a3c7fe3"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "lib/overflow_kunit.c",
"function": "overflow_allocation_test"
},
"digest": {
"length": 150.0,
"function_hash": "174784423374021099639097640005010280903"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@99ddb9c58511f1b71e23d02a06082bf6d2dd2133",
"signature_version": "v1",
"id": "CVE-2024-46823-45485c17"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "lib/overflow_kunit.c",
"function": "overflow_allocation_test"
},
"digest": {
"length": 150.0,
"function_hash": "174784423374021099639097640005010280903"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d1207f07decc66546a7fa463d2f335a856c986ef",
"signature_version": "v1",
"id": "CVE-2024-46823-4cbb4b9a"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "lib/overflow_kunit.c"
},
"digest": {
"line_hashes": [
"24718893345181044107403099244742105933",
"69146277067576128048751509579037879633",
"163730838879666678308731329256796600163",
"278732933810082709840351872082053486380",
"286044527340639003922954091497654095285",
"180384276829204298780865824806005845475",
"66762669622201280861495264636969730096",
"93345989807347841722873037925122204148"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@99ddb9c58511f1b71e23d02a06082bf6d2dd2133",
"signature_version": "v1",
"id": "CVE-2024-46823-a2fa74bb"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "lib/overflow_kunit.c"
},
"digest": {
"line_hashes": [
"24718893345181044107403099244742105933",
"69146277067576128048751509579037879633",
"163730838879666678308731329256796600163",
"278732933810082709840351872082053486380",
"282384388562911526649236247017008987514",
"171841024305180512850877824201414054637",
"96515527235300303631386387249603895029",
"313962626299140084975041189356627104745"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@92e9bac18124682c4b99ede9ee3bcdd68f121e92",
"signature_version": "v1",
"id": "CVE-2024-46823-dead0586"
}
]