diff options
| author | Guangshuo Li <lgs201920130244@gmail.com> | 2026-07-08 18:46:17 +0800 |
|---|---|---|
| committer | Damien Le Moal <dlemoal@kernel.org> | 2026-11-19 04:25:09 +0900 |
| commit | fe779a359d40ece9060932467b5dbe464d43f00e (patch) | |
| tree | dba56ab7ef95a6202534f088e42fd04cd7effd93 /kernel/debug | |
| parent | aebb7274476403040d582c61478df8f4a7bf9cd3 (diff) | |
zonefs: check multiplication overflow in zonefs_fname_to_fno()
The change referenced by the Fixes tag added overflow checking for the
addition used while converting a zone file name to a zone number.
However, the digit value and decimal shift are still computed with
unchecked signed long multiplications. For sufficiently long numeric
names, shift or digit can overflow before check_add_overflow() sees the
value, leaving the parser with an already corrupted intermediate result.
Check the digit and shift multiplications as well. Only advance the shift
when another digit remains, so valid boundary values are not rejected due
to an unused final shift update.
Fixes: 3a8389d42bdf ("zonefs: handle integer overflow in zonefs_fname_to_fno")
Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Diffstat (limited to 'kernel/debug')
0 files changed, 0 insertions, 0 deletions
