KSPP / linux

Linux kernel source tree (Kernel Self Protection Project)
https://kernsec.org/wiki/index.php/Kernel_Self_Protection_Project
Other
80 stars 5 forks source link

Fix -Warray-bounds warnings in kernel/bpf/lpm_trie.c: #301

Closed GustavoARSilva closed 5 months ago

GustavoARSilva commented 1 year ago
kernel/bpf/lpm_trie.c:207:51: warning: array subscript i is outside array bounds of ‘const __u8[0]’ {aka ‘const unsigned char[]’} [-Warray-bounds=]
kernel/bpf/lpm_trie.c:218:63: warning: array subscript i is outside array bounds of ‘const __u8[0]’ {aka ‘const unsigned char[]’} [-Warray-bounds=]
kernel/bpf/lpm_trie.c:195:51: warning: array subscript i is outside array bounds of ‘const __u8[0]’ {aka ‘const unsigned char[]’} [-Warray-bounds=]
GustavoARSilva commented 1 year ago

Patch: https://lore.kernel.org/linux-hardening/20230204183241.never.481-kees@kernel.org/