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.