diff options
author | Nikita Zhandarovich <n.zhandarovich@fintech.ru> | 2024-07-24 10:51:58 -0700 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2024-08-05 20:18:35 +0000 |
commit | 50438dbc483ca6a133d2bce9d5d6747bcee38371 (patch) | |
tree | 64b8e35b73b5cd710df9cd4dc1116b579e67e77c /fs/f2fs/f2fs.h | |
parent | 1cade98cf6415897bf9342ee451cc5b40b58c638 (diff) |
f2fs: avoid potential int overflow in sanity_check_area_boundary()
While calculating the end addresses of main area and segment 0, u32
may be not enough to hold the result without the danger of int
overflow.
Just in case, play it safe and cast one of the operands to a
wider type (u64).
Found by Linux Verification Center (linuxtesting.org) with static
analysis tool SVACE.
Fixes: fd694733d523 ("f2fs: cover large section in sanity check of super")
Cc: stable@vger.kernel.org
Signed-off-by: Nikita Zhandarovich <n.zhandarovich@fintech.ru>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/f2fs.h')
0 files changed, 0 insertions, 0 deletions