Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'hardening-v6.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux

Pull hardening fixes from Kees Cook:

- ARM: stacktrace: include asm/sections.h in asm/stacktrace.h (Arnd
Bergmann)

- ubsan: Fix incorrect hand-side used in handle (Junhui Pei)

- hardening: Require clang 20.1.0 for __counted_by (Nathan Chancellor)

* tag 'hardening-v6.17-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
hardening: Require clang 20.1.0 for __counted_by
ARM: stacktrace: include asm/sections.h in asm/stacktrace.h
ubsan: Fix incorrect hand-side used in handle

+10 -8
+2 -1
arch/arm/include/asm/stacktrace.h
··· 2 2 #ifndef __ASM_STACKTRACE_H 3 3 #define __ASM_STACKTRACE_H 4 4 5 - #include <asm/ptrace.h> 6 5 #include <linux/llist.h> 6 + #include <asm/ptrace.h> 7 + #include <asm/sections.h> 7 8 8 9 struct stackframe { 9 10 /*
+5 -4
init/Kconfig
··· 117 117 118 118 config CC_HAS_COUNTED_BY 119 119 bool 120 - # clang needs to be at least 19.1.3 to avoid __bdos miscalculations 121 - # https://github.com/llvm/llvm-project/pull/110497 122 - # https://github.com/llvm/llvm-project/pull/112636 123 - default y if CC_IS_CLANG && CLANG_VERSION >= 190103 120 + # clang needs to be at least 20.1.0 to avoid potential crashes 121 + # when building structures that contain __counted_by 122 + # https://github.com/ClangBuiltLinux/linux/issues/2114 123 + # https://github.com/llvm/llvm-project/commit/160fb1121cdf703c3ef5e61fb26c5659eb581489 124 + default y if CC_IS_CLANG && CLANG_VERSION >= 200100 124 125 # supported since gcc 15.1.0 125 126 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108896 126 127 default y if CC_IS_GCC && GCC_VERSION >= 150100
+3 -3
lib/ubsan.c
··· 333 333 void __ubsan_handle_divrem_overflow(void *_data, void *lhs, void *rhs) 334 334 { 335 335 struct overflow_data *data = _data; 336 - char rhs_val_str[VALUE_LENGTH]; 336 + char lhs_val_str[VALUE_LENGTH]; 337 337 338 338 if (suppress_report(&data->location)) 339 339 return; 340 340 341 341 ubsan_prologue(&data->location, "division-overflow"); 342 342 343 - val_to_string(rhs_val_str, sizeof(rhs_val_str), data->type, rhs); 343 + val_to_string(lhs_val_str, sizeof(lhs_val_str), data->type, lhs); 344 344 345 345 if (type_is_signed(data->type) && get_signed_val(data->type, rhs) == -1) 346 346 pr_err("division of %s by -1 cannot be represented in type %s\n", 347 - rhs_val_str, data->type->type_name); 347 + lhs_val_str, data->type->type_name); 348 348 else 349 349 pr_err("division by zero\n"); 350 350