mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 02:53:36 +02:00
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: |
||
|---|---|---|
| .. | ||
| compress.h | ||
| data.c | ||
| decompressor_lzma.c | ||
| decompressor.c | ||
| dir.c | ||
| erofs_fs.h | ||
| fscache.c | ||
| inode.c | ||
| internal.h | ||
| Kconfig | ||
| Makefile | ||
| namei.c | ||
| pcpubuf.c | ||
| super.c | ||
| sysfs.c | ||
| tagptr.h | ||
| utils.c | ||
| xattr.c | ||
| xattr.h | ||
| zdata.c | ||
| zdata.h | ||
| zmap.c | ||