aboutsummaryrefslogtreecommitdiff
path: root/include/linux/fpga/fpga-region.h
diff options
context:
space:
mode:
authorJingbo Xu <[email protected]>2022-10-21 10:31:53 +0800
committerGao Xiang <[email protected]>2022-11-10 09:53:20 +0800
commit39bfcb8138f6dc3375f23b1e62ccfc7c0d83295d (patch)
tree158096b93d6c55fa5ab086c824a676a44b52284e /include/linux/fpga/fpga-region.h
parente6d9f9ba111b56154f1b1120252aff269cebd49c (diff)
erofs: fix use-after-free of fsid and domain_id string
When erofs instance is remounted with fsid or domain_id mount option specified, the original fsid and domain_id string pointer in sbi->opt is directly overridden with the fsid and domain_id string in the new fs_context, without freeing the original fsid and domain_id string. What's worse, when the new fsid and domain_id string is transferred to sbi, they are not reset to NULL in fs_context, and thus they are freed when remount finishes, while sbi is still referring to these strings. Reconfiguration for fsid and domain_id seems unusual. Thus clarify this restriction explicitly and dump a warning when users are attempting to do this. Besides, to fix the use-after-free issue, move fsid and domain_id from erofs_mount_opts to outside. Fixes: c6be2bd0a5dd ("erofs: register fscache volume") Fixes: 8b7adf1dff3d ("erofs: introduce fscache-based domain") Signed-off-by: Jingbo Xu <[email protected]> Reviewed-by: Jia Zhu <[email protected]> Reviewed-by: Chao Yu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Gao Xiang <[email protected]>
Diffstat (limited to 'include/linux/fpga/fpga-region.h')
0 files changed, 0 insertions, 0 deletions