]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
f2fs: fix wrong total_sections check and fsmeta check
authorWang Xiaojun <wangxiaojun11@huawei.com>
Wed, 29 Sep 2021 23:57:39 +0000 (16:57 -0700)
committerKelsey Skunberg <kelsey.skunberg@canonical.com>
Tue, 12 Oct 2021 22:31:05 +0000 (16:31 -0600)
commit4206d68ef3bb4b8182899f45e4c6328619b5287e
tree22add75e5a66d01c73c967a1f0d90e1ec3a086a9
parentda799a8258b3b7c3ab6e9c8e4b6b4604db1b967a
f2fs: fix wrong total_sections check and fsmeta check

Meta area is not included in section_count computation.
So the minimum number of total_sections is 1 meanwhile it cannot be
greater than segment_count_main.

The minimum number of meta segments is 8 (SB + 2 (CP + SIT + NAT) + SSA).

Signed-off-by: Wang Xiaojun <wangxiaojun11@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
(cherry-picked from commit f99ba9add67ce63eca3fe68a3d5e9996cd2c33b5)
CVE-2019-19449
Signed-off-by: Luke Nowakowski-Krijger <luke.nowakowskikrijger@canonical.com>
Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
fs/f2fs/segment.h
fs/f2fs/super.c