linux/scripts
Julian Braha a5e84d6f6d
kconfig: check for out-of-bounds numeric constants
The Kconfig interpreter internally represents constants as strings, then
attempts to parse them as 64-bit signed integers for 'int' options, and
64-bit unsigned integers for 'hex' options.

However, there is currently no check that the conversion succeeds, leading
to failures when the values are actually used. For example:

  config LARGE_INT
    int
    default 10000000000000000000

  config BUGGED_INT_COMPARISON
    bool
    default y if LARGE_INT < 2

Obviously 10000000000000000000 is larger than 2, but the Kconfig
interpreter will fallback to comparing the two values with strcmp() after
the numeric conversion fails, causing the first character, '1', to be
compared with '2', and giving the wrong result.

Since none of these out-of-bounds values are used as constants anywhere in
the tree, we can already make these error out.

Assisted-by: LLM
Signed-off-by: Julian Braha <julianbraha@gmail.com>
Reviewed-by: Nicolas Schier <n.schier@fritz.com>
Link: https://patch.msgid.link/20260915211508.291790-3-julianbraha@gmail.com
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
2026-09-17 16:31:00 -07:00
..
atomic rust: helpers: Move #define __rust_helper out of atomic.c 2026-01-09 19:01:42 +08:00
bash-completion kbuild: add Kbuild bash completion 2025-03-15 21:22:52 +09:00
basic fixdep: make gendered language gender-neutral 2026-08-05 14:46:50 +02:00
clang-tools linux_kselftest-kunit-7.2-rc1 2026-06-16 16:33:57 +05:30
coccinelle coccinelle: ifnulldev_put: update error message 2026-08-30 14:36:11 +02:00
crypto lib/crypto: tests: Add KUnit test suite for AES-GCM 2026-08-10 20:17:56 -07:00
dtc dtc: dt-check-style: Simplify setting depth of DtsLine 2026-08-14 15:43:24 -05:00
dummy-tools kbuild: dummy-tools: Add python3 2026-01-29 17:12:13 -07:00
gcc-plugins gcc-plugins: Always define CONST_CAST_GIMPLE and CONST_CAST_TREE 2026-05-14 09:24:32 -07:00
gdb mm/page_owner: add MR_NEVER to enum migrate_reason and use it for last_migrate_reason 2026-07-28 21:11:50 -07:00
gendwarfksyms gendwarfksyms: Fix build on 32-bit hosts 2025-12-22 16:35:54 +00:00
genksyms genksyms: Fix parsing a declarator with a preceding attribute 2026-02-26 11:53:05 -07:00
include
ipe scripts: ipe: polgen: remove redundant close and error exit path 2024-11-19 13:57:03 -08:00
kconfig kconfig: check for out-of-bounds numeric constants 2026-09-17 16:31:00 -07:00
ksymoops
livepatch objtool/klp: Fix symbol resolution for duplicate data symbols 2026-08-03 07:12:39 +02:00
mod Objtool updates for v7.3: 2026-08-18 12:18:33 -07:00
package kbuild: rpm-pkg: Preserve BTF sections in kernel modules during debuginfo stripping 2026-07-29 16:21:42 -07:00
sbom scripts/sbom: catch ValueError from malformed shell quoting 2026-07-31 14:19:36 +02:00
selinux docs: Remove remainders of reiserfs 2025-08-18 10:45:43 -06:00
tracing scripts/tracing: Remove scripts/tracing/draw_functrace.py 2025-03-20 07:02:21 -04:00
.gitignore scripts: add tracepoint-update to the list of ignores files 2025-10-29 08:46:05 -04:00
as-version.sh
asn1_compiler.c
bloat-o-meter scripts/bloat-o-meter: ignore _sdata 2026-05-28 21:24:48 -07:00
bootgraph.pl
bpf_doc.py bpf: Finish constification of 1st parameter of bpf_d_path() 2025-10-04 09:05:23 -07:00
build-version
cc-can-link.sh kbuild: Fix CC_CAN_LINK detection 2026-02-13 14:23:06 -05:00
cc-version.sh
check_extable.sh
check-function-names.sh kbuild: prefer ${NM} in check-function-names.sh 2026-01-14 14:13:41 +01:00
check-git
check-sysctl-docs docs: Replace spaces with tabs in check-sysctl-docs 2025-07-23 11:57:05 +02:00
check-uapi.sh check-uapi: use dummy libc includes 2026-03-20 21:43:56 +01:00
checkdeclares.pl
checker-valid.sh compiler: Use __typeof_unqual__() for __unqual_scalar_typeof() 2026-01-18 10:32:03 +01:00
checkincludes.pl
checkkconfigsymbols.py
checkpatch.pl mm.git review status for master..mm-nonmm-stable 2026-08-23 08:07:11 -07:00
checkstack.pl
checksyscalls.sh checksyscalls: only run when necessary 2026-04-05 09:21:31 +02:00
checkversion.pl
cleanfile
cleanpatch
coccicheck coccinelle: update Coccinelle website URL 2026-08-23 22:12:10 +02:00
config scripts/config: Use in-place editing (-i) in sed portably 2026-08-05 14:52:00 +02:00
const_structs.checkpatch const_structs.checkpatch: add bin_attribute 2025-06-17 10:44:07 +02:00
container scripts: add tool to run containerized builds 2026-01-22 15:30:48 -07:00
context-analysis-suppression.txt locking/rtmutex: Add context analysis 2026-03-08 11:06:53 +01:00
decode_stacktrace.sh decode_stacktrace: decode caller address 2026-03-27 21:19:45 -07:00
decodecode scripts/decodecode: return 0 on success 2026-03-27 21:19:48 -07:00
depmod.sh kbuild: add $(objtree)/ prefix to some in-kernel build artifacts 2024-11-27 09:38:27 +09:00
dev-needs.sh
diffconfig
elf-parse.c sorttable: Move ELF parsing into scripts/elf-parse.[ch] 2025-10-24 16:43:14 -04:00
elf-parse.h sorttable: Move ELF parsing into scripts/elf-parse.[ch] 2025-10-24 16:43:14 -04:00
extract_xc3028.pl
extract-fwblobs scripts: add script to extract built-in firmware blobs 2025-03-16 22:30:46 -07:00
extract-ikconfig
extract-module-sig.pl
extract-sys-certs.pl
extract-vmlinux extract-vmlinux: Output used decompression method 2025-08-28 15:25:48 -07:00
faddr2line scripts/faddr2line: Fix "Argument list too long" error 2025-10-14 14:45:20 -07:00
file-size.sh
gen_packed_field_checks.c lib: packing: add pack_fields() and unpack_fields() 2024-12-11 20:13:00 -08:00
gen-btf.sh scripts/gen-btf.sh: Use CONFIG_SHELL for execution 2026-01-21 12:36:32 -08:00
gen-crc-consts.py riscv/crc: add "template" for Zbc optimized CRC functions 2025-03-10 09:29:08 -07:00
gen-randstruct-seed.sh
generate_builtin_ranges.awk kbuild: exclude .rodata.(cst|str)* when building ranges 2025-03-15 21:22:52 +09:00
generate_initcall_order.pl
generate_rust_analyzer.py rust: zerocopy-derive: enable support in kbuild 2026-06-09 04:13:23 +02:00
generate_rust_target.rs s390 updates for 7.2 merge window 2026-06-16 05:08:13 +05:30
get_dvb_firmware
get_maintainer.pl get_maintainer: add --json output mode 2026-05-28 21:24:42 -07:00
gfp-translate
git-resolve.sh git-resolve: add SPDX and copyright line 2025-04-25 15:54:24 +02:00
git.orderFile
head-object-list.txt openrisc: place exception table at the head of vmlinux 2024-12-10 12:04:19 +00:00
headerdep.pl
headers_install.sh scripts: headers_install.sh: Normalize __ASSEMBLY__ to __ASSEMBLER__ 2026-08-04 22:34:06 +02:00
insert-sys-cert.c
install.sh
integer-wrap-ignore.scl ubsan/overflow: Enable ignorelist parsing and add type filter 2025-03-07 19:58:05 -08:00
jobserver-exec scripts/jobserver-exec: propagate child exit status 2026-06-10 13:37:05 -05:00
kallsyms.c kallsyms: add symbol size for kallsyms symbols that can change size 2026-08-05 14:59:45 +02:00
Kbuild.include kbuild: add $(objtree)/ prefix to some in-kernel build artifacts 2024-11-27 09:38:27 +09:00
Kconfig.include rust: kconfig: Don't require RUST_IS_AVAILABLE for rustc-option 2026-02-03 15:29:17 -07:00
kernel-doc docs: add a scripts/kernel-doc symbolic link 2026-01-20 15:57:06 -07:00
ld-version.sh
leaking_addresses.pl
Lindent
link-vmlinux.sh kbuild: link-vmlinux.sh: improve detection of third pass requirement 2026-08-05 14:59:46 +02:00
macro_checker.py
make_fit.py scripts/make_fit.py: Drop explicit LZMA parallel compression 2026-02-13 14:24:01 -05:00
Makefile sign-file: use 'struct module_signature' from the UAPI headers 2026-03-24 21:42:37 +00:00
Makefile.asm-headers kbuild: Support generated asm-headers in subdirectories 2026-08-10 16:25:21 +02:00
Makefile.autofdo kbuild: rust: rename flag to -Zdebuginfo-for-profiling for Rust >= 1.98 2026-06-04 09:26:57 +02:00
Makefile.btf resolve_btfids: Emit bpf_kfunc and bpf_fastcall decl tags 2026-08-06 22:01:28 -07:00
Makefile.build kbuild: rust: keep Rust objects out of Clang LTO with inline helpers 2026-08-23 21:27:17 +02:00
Makefile.clang kbuild: clang: Support building UM with SUBARCH=i386 2025-03-04 09:40:13 -08:00
Makefile.clean kbuild: change working directory to external module directory with M= 2024-11-28 08:10:23 +09:00
Makefile.compiler rust: kasan/kbuild: fix rustc-option when cross-compiling 2026-05-26 09:44:54 +02:00
Makefile.context-analysis compiler-context-analysis: Introduce header suppressions 2026-01-05 16:43:33 +01:00
Makefile.debug
Makefile.defconf kbuild: suppress stdout from merge_config for silent builds 2025-01-10 23:01:21 +09:00
Makefile.dtbinst
Makefile.dtbs scripts/dtc: Update to upstream version v1.7.2-62-ga26ef6400bd8 2026-02-03 20:58:12 -06:00
Makefile.gcc-plugins scripts/gcc-plugins: suppress recorded GCC switches for extmod builds 2026-09-01 16:12:15 -07:00
Makefile.headersinst
Makefile.host kbuild: support building external modules in a separate build directory 2024-11-28 08:11:55 +09:00
Makefile.kasan rust: kasan: add support for Software Tag-Based KASAN 2026-05-27 01:54:22 +02:00
Makefile.kcov - The 2 patch series "zram: support algorithm-specific parameters" from 2025-06-02 16:00:26 -07:00
Makefile.kcsan
Makefile.kmsan
Makefile.kstack_erase kstack_erase: Fix missed export of renamed KSTACK_ERASE_CFLAGS 2025-07-29 17:17:46 -07:00
Makefile.lib Objtool updates for v7.2: 2026-06-15 14:31:58 +05:30
Makefile.modfinal kbuild/btf: Remove broken module relinking exclusion 2026-04-29 18:03:49 -07:00
Makefile.modinst kbuild: Use objtree for module signing key path 2025-11-08 12:17:58 +01:00
Makefile.modpost modpost: Allow extended modversions without basic MODVERSIONS 2025-01-11 02:36:32 +09:00
Makefile.package kbuild: modules-cpio-pkg: Respect INSTALL_MOD_PATH 2026-03-30 07:38:26 +02:00
Makefile.propeller kbuild: Fix Propeller build option 2024-11-27 09:38:27 +09:00
Makefile.randstruct
Makefile.thinlto kbuild: distributed build support for Clang ThinLTO 2026-05-29 13:44:29 -07:00
Makefile.ubsan ARM: 2025-05-29 08:10:01 -07:00
Makefile.userprogs
Makefile.vdsoinst kbuild: vdso_install: drop build ID architecture allow-list 2026-04-02 17:50:40 +02:00
Makefile.vmlinux bpf-next-7.0 2026-02-10 11:26:21 -08:00
Makefile.vmlinux_a kbuild: Remove unnecessary 'T' modifier in cmd_ar_builtin_fixup 2026-06-02 18:41:50 -07:00
Makefile.vmlinux_o objtool/klp: Add .klp.symid for sympos disambiguation 2026-08-03 07:12:39 +02:00
Makefile.warn scripts/Makefile.warn: Drop -Wformat handling for clang < 16 2026-05-27 15:20:05 -07:00
makelst
markup_oops.pl
min-tool-version.sh rust/powerpc: Set min rustc version for powerpc 2026-07-31 16:57:48 +05:30
misc-check scripts/misc-check: update export checks for EXPORT_SYMBOL_FOR_MODULES() 2025-08-26 12:00:17 -07:00
mkcompile_h scripts/mkcompile_h: Update LINUX_COMPILE_HOST command substitution syntax 2026-08-31 16:57:04 -07:00
mksysmap modpost: Create modalias for builtin modules 2025-09-24 09:10:45 -07:00
mkuboot.sh
module-common.c
module.lds.S module: Remove unused DISCARD_EH_FRAME definition from module.lds.S 2026-08-06 13:29:02 +02:00
modules-check.sh
nsdeps coccinelle: update Coccinelle website URL 2026-08-23 22:12:10 +02:00
objdiff
objdump-func
orc_hash.sh
pahole-version.sh
parse-maintainers.pl
patch-kernel
profile2linkerlist.pl
prune-kernel
recordmcount.c
recordmcount.h
recordmcount.pl tracing: Remove redundant config HAVE_FTRACE_MCOUNT_RECORD 2025-07-22 20:15:56 -04:00
relocs_check.sh
remove-stale-files
rust_is_available_bindgen_libclang_22.h rust: rust_is_available: warn for bindgen < 0.72.1 && libclang >= 22 2026-08-03 14:08:42 +02:00
rust_is_available_bindgen_libclang.h
rust_is_available_test.py rust: rust_is_available: warn for bindgen < 0.72.1 && libclang >= 22 2026-08-03 14:08:42 +02:00
rust_is_available.sh rust: rust_is_available: warn for bindgen < 0.72.1 && libclang >= 22 2026-08-03 14:08:42 +02:00
rustc-llvm-version.sh
rustc-version.sh
rustdoc_test_builder.rs rust: doctest: fix incorrect pattern in replacement 2026-06-19 09:39:50 +02:00
rustdoc_test_gen.rs rust: macros: auto-insert OwnerModule in #[vtable] 2026-08-12 09:36:26 +02:00
setlocalversion setlocalversion: make tag local to try_tag() 2026-08-31 16:57:21 -07:00
show_delta scripts: make python shebangs specific about desired version 2025-03-15 21:19:44 +09:00
sign-file.c sign-file: use 'struct module_signature' from the UAPI headers 2026-03-24 21:42:37 +00:00
sorttable.c scripts/sorttable: Handle RISC-V patchable ftrace entries 2026-06-25 13:15:03 -06:00
spdxcheck-test.sh
spdxcheck.py treewide: Update email address 2026-01-11 06:09:11 -10:00
spdxexclude
spelling.txt treewide: fix transposed "sign" typos and update spelling.txt 2026-06-17 15:37:47 -07:00
ssl-common.h
stackdelta
stackusage
subarch.include
syscall.tbl arch: hookup fchroot() system call 2026-07-27 17:18:00 +02:00
syscallhdr.sh
syscallnr.sh
syscalltbl.sh
tags.sh scripts/tags.sh: Add support for rust source files 2026-08-05 14:31:55 +02:00
timer_migration_tree.py scripts/timers: Add timer_migration_tree.py 2026-05-06 08:33:07 +02:00
tools-support-relr.sh
tracepoint-update.c scripts/tracepoint-update: Fix memory leak in add_string() on failure 2026-01-23 13:34:45 -05:00
unifdef.c
update-intel-ucode-defs.py scripts/x86/intel: Add a script to update the old microcode list 2026-04-29 15:53:19 -07:00
ver_linux docs: changes.rst and ver_linux: sort the lists 2026-03-30 10:36:11 -06:00
verify_builtin_ranges.awk
xen-hypercalls.sh
xz_wrap.sh