Commit 726cc5e
committed
dmaengine: idxd: Fix possible Use-After-Free in irq_process_work_list
jira VULN-8254
cve CVE-2024-40956
commit-author Li RongQing <[email protected]>
commit e3215de
Use list_for_each_entry_safe() to allow iterating through the list and
deleting the entry in the iteration process. The descriptor is freed via
idxd_desc_complete() and there's a slight chance may cause issue for
the list iterator when the descriptor is reused by another thread
without it being deleted from the list.
Fixes: 16e19e1 ("dmaengine: idxd: Fix list corruption in description completion")
Signed-off-by: Li RongQing <[email protected]>
Reviewed-by: Dave Jiang <[email protected]>
Reviewed-by: Fenghua Yu <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Vinod Koul <[email protected]>
(cherry picked from commit e3215de)
Signed-off-by: David Gomez <[email protected]>1 parent 053dedd commit 726cc5e
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
460 | 460 | | |
461 | 461 | | |
462 | 462 | | |
463 | | - | |
| 463 | + | |
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
467 | 467 | | |
| 468 | + | |
| 469 | + | |
468 | 470 | | |
469 | 471 | | |
470 | 472 | | |
| |||
0 commit comments