You need to sign in or sign up before continuing.
ext4: make sure ext4_append() always allocates new block
mainline inclusion from mainline-v6.0-rc1 commit b8a04fe7 category: bugfix bugzilla: 186639, https://gitee.com/openeuler/kernel/issues/I58WSQ CVE: CVE-2022-1184 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b8a04fe77ef1360fbf73c80fddbdfeaa9407ed1b -------------------------------- ext4_append() must always allocate a new block, otherwise we run the risk of overwriting existing directory block corrupting the directory tree in the process resulting in all manner of problems later on. Add a sanity check to see if the logical block is already allocated and error out if it is. Cc: stable@kernel.org Signed-off-by: NLukas Czerner <lczerner@redhat.com> Reviewed-by: NAndreas Dilger <adilger@dilger.ca> Link: https://lore.kernel.org/r/20220704142721.157985-2-lczerner@redhat.comSigned-off-by: NTheodore Ts'o <tytso@mit.edu> Signed-off-by: NBaokun Li <libaokun1@huawei.com> Reviewed-by: NZhang Yi <yi.zhang@huawei.com> Reviewed-by: NXiu Jianfeng <xiujianfeng@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Showing
想要评论请 注册 或 登录