summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorLeizhen Zhang <lzsx618@gmail.com>2026-10-08 11:45:40 -0500
committerNathan Chancellor <nathan@kernel.org>2026-10-09 22:31:53 +0200
commita8f72a75b38a153d32a59b2ebca1d7079db1dd1a (patch)
tree61758ad4ac8f5f724ecc1e07f5cf56827e1de374 /tools/lib/python
parent52f26261e27dbdb7c6dea75d8f1a92ea805b2c58 (diff)
downloadlinux-next-a8f72a75b38a153d32a59b2ebca1d7079db1dd1a.tar.gz
linux-next-a8f72a75b38a153d32a59b2ebca1d7079db1dd1a.zip
kconfig: use the value argument in sym_get_near_range_bound()
sym_get_near_range_bound() is meant to check whether the given value is outside of the active range of an int/hex symbol, and is called with the symbol's current value from sym_calc_value() and with the default value from sym_get_string_default(). Since commit 9b8719973ee2 ("kconfig: use unsigned integers for hex range checks") it ignores its value argument and uses the current value of the symbol (via sym_get_range_val()) instead. As a result, an out-of-range default is no longer clamped in sym_get_string_default(), and savedefconfig writes out values that are equal to the effective default again, for example CONFIG_A=4 for: config A int "a" range 1 4 default 8 The existing savedefconfig_range test did not catch this because it only covers symbols without a prompt. Parse the value argument again, and add a test case for a symbol with a prompt. Found while fuzzing Kconfig input with ASan/UBSan. Fixes: 9b8719973ee2 ("kconfig: use unsigned integers for hex range checks") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Leizhen Zhang <lzsx618@gmail.com> Tested-by: Julian Braha <julianbraha@gmail.com> Reviewed-by: Julian Braha <julianbraha@gmail.com> Link: https://patch.msgid.link/20261008164540.3686383-1-lzsx618@gmail.com Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions