In the Linux kernel, the following vulnerability has been resolved:
driver: base: fix UAF when driver_attach failed
When driverattach(drv); failed, the driverprivate will be freed. But it has been added to the bus, which caused a UAF.
To fix it, we need to delete it from the bus when failed.