In the Linux kernel, the following vulnerability has been resolved:
scsi: pm80xx: Do not call scsiremovehost() in pm8001_alloc()
Calling scsiremovehost() before scsiaddhost() results in a crash:
BUG: kernel NULL pointer dereference, address: 0000000000000108 RIP: 0010:devicedel+0x63/0x440 Call Trace: deviceunregister+0x17/0x60 scsiremovehost+0xee/0x2a0 pm8001pciprobe+0x6ef/0x1b90 [pm80xx] localpciprobe+0x3f/0x90
We cannot call scsiremovehost() in pm8001alloc() because scsiadd_host() has not been called yet at that point in time.
Function call tree:
pm8001pciprobe()
|
- pm8001_pci_alloc()
| |
|
- pm8001alloc()
| |
| - scsi_remove_host()
|
- scsiadd_host()