Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe3bcc2e authored by Eric Auger's avatar Eric Auger Committed by Greg Kroah-Hartman
Browse files

iommu: fix KASAN use-after-free in iommu_insert_resv_region



commit 4c80ba392bf603d468ea827d902f8e7b2505fbf4 upstream.

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: 4dbd258f ("iommu: Revisit iommu_insert_resv_region() implementation")
Signed-off-by: default avatarEric Auger <eric.auger@redhat.com>
Reported-by: default avatarQian Cai <cai@lca.pw>
Reviewed-by: default avatarJerry Snitselaar <jsnitsel@redhat.com>
Cc: Stable <stable@vger.kernel.org> #v5.3+
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4d6ebc4c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment