Skip to content

[PW_SID:957928] iommu/riscv: fix use after free of riscv_iommu_domain#350

Closed
linux-riscv-bot wants to merge 2 commits into
workflow__riscv__fixesfrom
pw957928
Closed

[PW_SID:957928] iommu/riscv: fix use after free of riscv_iommu_domain#350
linux-riscv-bot wants to merge 2 commits into
workflow__riscv__fixesfrom
pw957928

Conversation

@linux-riscv-bot
Copy link
Copy Markdown

PR for series 957928 applied to workflow__riscv__fixes

Name: iommu/riscv: fix use after free of riscv_iommu_domain
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=957928
Version: 1

Linux RISC-V bot and others added 2 commits April 24, 2025 20:46
The function vfio_group_detach_container begins by calling
vfio_iommu_type1_detach_group, which may subsequently calls
riscv_iommu_free_paging_domain to release the riscv_iommu_domain.
Then, iommu_group_release_dma_owner is triggered, which results in
the execution of riscv_iommu_attach_paging_domain and
riscv_iommu_bond_unlink(info->domain). However, the info->domain
had been freed beforehand but was not set to NULL, leading to errors.

This commit resolves the issue by setting info->domain to NULL within
riscv_iommu_bond_unlink, a function that is called by
riscv_iommu_attach_blocking_domain before the domain was freed.

Signed-off-by: BillXiang <xiangwencheng@lanxincomputing.com>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "iommu/riscv: fix use after free of riscv_iommu_domain"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 102.74 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "iommu/riscv: fix use after free of riscv_iommu_domain"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 961.19 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "iommu/riscv: fix use after free of riscv_iommu_domain"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1275.65 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "iommu/riscv: fix use after free of riscv_iommu_domain"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 23.62 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "iommu/riscv: fix use after free of riscv_iommu_domain"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 21.47 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "iommu/riscv: fix use after free of riscv_iommu_domain"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.76 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "iommu/riscv: fix use after free of riscv_iommu_domain"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 39.00 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "iommu/riscv: fix use after free of riscv_iommu_domain"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.23 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "iommu/riscv: fix use after free of riscv_iommu_domain"
kdoc
Desc: Detects for kdoc errors
Duration: 0.91 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "iommu/riscv: fix use after free of riscv_iommu_domain"
module-param
Desc: Detect module_param changes
Duration: 0.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "iommu/riscv: fix use after free of riscv_iommu_domain"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 1.25 seconds
Result: PASS

@linux-riscv-bot
Copy link
Copy Markdown
Author

Patch 1: "iommu/riscv: fix use after free of riscv_iommu_domain"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 2.42 seconds
Result: PASS

@linux-riscv-bot linux-riscv-bot force-pushed the workflow__riscv__fixes branch 2 times, most recently from 4d9ad71 to 625be03 Compare May 6, 2025 09:20
@linux-riscv-bot linux-riscv-bot deleted the pw957928 branch May 7, 2025 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant