[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202404151738.AC6F6C210@keescook>
Date: Mon, 15 Apr 2024 17:46:27 -0700
From: Kees Cook <keescook@...omium.org>
To: Nathan Chancellor <nathan@...nel.org>
Cc: Marco Elver <elver@...gle.com>, Justin Stitt <justinstitt@...gle.com>,
Andrey Konovalov <andreyknvl@...il.com>,
Andrey Ryabinin <ryabinin.a.a@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
kasan-dev@...glegroups.com, linux-hardening@...r.kernel.org,
Nick Desaulniers <ndesaulniers@...gle.com>,
Bill Wendling <morbo@...gle.com>, linux-kernel@...r.kernel.org,
llvm@...ts.linux.dev
Subject: Re: [PATCH] ubsan: Add awareness of signed integer overflow traps
On Mon, Apr 15, 2024 at 11:34:54AM -0700, Nathan Chancellor wrote:
> On Mon, Apr 15, 2024 at 11:28:35AM -0700, Kees Cook wrote:
> > On arm64, UBSAN traps can be decoded from the trap instruction. Add the
> > add, sub, and mul overflow trap codes now that CONFIG_UBSAN_SIGNED_WRAP
> > exists. Seen under clang 19:
> >
> > Internal error: UBSAN: unrecognized failure code: 00000000f2005515 [#1] PREEMPT SMP
> >
> > Reported-by: Nathan Chancellor <nathan@...nel.org>
> > Closes: https://lore.kernel.org/lkml/20240411-fix-ubsan-in-hardening-config-v1-0-e0177c80ffaa@kernel.org
> > Fixes: 557f8c582a9b ("ubsan: Reintroduce signed overflow sanitizer")
> > Signed-off-by: Kees Cook <keescook@...omium.org>
>
> As I mentioned, CONFIG_UBSAN_SIGNED_INTEGER_WRAP needs to be
> CONFIG_UBSAN_SIGNED_WRAP. I applied this change with that fix up and the
Whoops; thanks!
> warning now becomes:
>
> Internal error: UBSAN: integer subtraction overflow: 00000000f2005515 [#1] PREEMPT SMP
Perfecto. :)
> So:
>
> Tested-by: Nathan Chancellor <nathan@...nel.org>
Thanks!
--
Kees Cook
Powered by blists - more mailing lists