Commit e208a1d
scsi: scsi_debug: Fix possible UAF in sdebug_add_host_helper()
If device_register() fails in sdebug_add_host_helper(), it will goto clean
and sdbg_host will be freed, but sdbg_host->host_list will not be removed
from sdebug_host_list, then list traversal may cause UAF. Fix it.
Fixes: 1da177e ("Linux-2.6.12-rc2")
Signed-off-by: Yuan Can <yuancan@huawei.com>
Link: https://lore.kernel.org/r/20221117084421.58918-1-yuancan@huawei.com
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>1 parent bc68e42 commit e208a1d
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7323 | 7323 | | |
7324 | 7324 | | |
7325 | 7325 | | |
7326 | | - | |
| 7326 | + | |
| 7327 | + | |
| 7328 | + | |
| 7329 | + | |
7327 | 7330 | | |
| 7331 | + | |
7328 | 7332 | | |
7329 | 7333 | | |
7330 | 7334 | | |
| |||
0 commit comments