In the Linux kernel, the following vulnerability has been resolved:
Bluetooth: btmtksdio: Fix kernel oops in btmtksdio_interrupt
Fix the following kernel oops in btmtksdio_interrrupt
[ 14.339134] btmtksdiointerrupt+0x28/0x54 [ 14.339139] processsdiopendingirqs+0x68/0x1a0 [ 14.339144] sdioirqwork+0x40/0x70 [ 14.339154] processonework+0x184/0x39c [ 14.339160] workerthread+0x228/0x3e8 [ 14.339168] kthread+0x148/0x3ac [ 14.339176] retfrom_fork+0x10/0x30
That happened because hdev->poweron is already called before sdiosetdrvdata which btmtksdiointerrupt handler relies on is not properly set up.
The details are shown as the below: hciregisterdev would run queuework(hdev->reqworkqueue, &hdev->poweron) as WQHIGHPRI workqueuestruct to complete the power-on sequeunce and thus hcipoweron may run before sdiosetdrvdata is done in btmtksdioprobe.
The hcidevdoopen in hcipoweron would initialize the device and enable the interrupt and thus it is possible that btmtksdiointerrupt is being called right before sdiosetdrvdata is filled out.
When btmtksdiointerrupt is being called and sdiosetdrvdata is not filled , the kernel oops is going to happen because btmtksdiointerrupt access an uninitialized pointer.