diff options
| author | Nikita Zhandarovich <[email protected]> | 2024-07-24 10:05:44 -0700 |
|---|---|---|
| committer | Jaegeuk Kim <[email protected]> | 2024-08-05 20:18:35 +0000 |
| commit | 47f268f33dff4a5e31541a990dc09f116f80e61c (patch) | |
| tree | c03a329ce2d10256ee76842d623e9ba8348c8b6a /tools/perf/scripts/python/stackcollapse.py | |
| parent | 2cf66b9de406dadbe7598618aa4541261d7bf536 (diff) | |
f2fs: prevent possible int overflow in dir_block_index()
The result of multiplication between values derived from functions
dir_buckets() and bucket_blocks() *could* technically reach
2^30 * 2^2 = 2^32.
While unlikely to happen, it is prudent to ensure that it will not
lead to integer overflow. Thus, use mul_u32_u32() as it's more
appropriate to mitigate the issue.
Found by Linux Verification Center (linuxtesting.org) with static
analysis tool SVACE.
Fixes: 3843154598a0 ("f2fs: introduce large directory support")
Cc: [email protected]
Signed-off-by: Nikita Zhandarovich <[email protected]>
Reviewed-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions