Commit 00aec02f authored by Chao Yu's avatar Chao Yu Committed by Zheng Zucheng
Browse files

f2fs: check validation of fault attrs in f2fs_build_fault_attr()

stable inclusion
from stable-v6.6.39
commit 44958ca9e400f57bd0478115519ffc350fcee61e
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAGS16
CVE: CVE-2024-42160

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=44958ca9e400f57bd0478115519ffc350fcee61e



--------------------------------

[ Upstream commit 4ed886b187f47447ad559619c48c086f432d2b77 ]

- It missed to check validation of fault attrs in parse_options(),
let's fix to add check condition in f2fs_build_fault_attr().
- Use f2fs_build_fault_attr() in __sbi_store() to clean up code.

Signed-off-by: default avatarChao Yu <chao@kernel.org>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>

Conflicts:
    fs/f2fs/sysfs.c
    fs/f2fs/super.c
[Some contexts different. No functional impact.]
Signed-off-by: default avatarZheng Zucheng <zhengzucheng@huawei.com>
parent b9950999
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment