Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
iommu: fix KASAN use-after-free in iommu_insert_resv_region
In case the new region gets merged into another one, the nr list node is freed. Checking its type while completing the merge algorithm leads to a use-after-free. Use new->type instead. Fixes: 4dbd258 ("iommu: Revisit iommu_insert_resv_region() implementation") Signed-off-by: Eric Auger <[email protected]> Reported-by: Qian Cai <[email protected]> Reviewed-by: Jerry Snitselaar <[email protected]> Cc: Stable <[email protected]> #v5.3+ Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information