From: Kees Cook <keescook@chromium.org>
To: Nathan Chancellor <nathan@kernel.org>
Cc: gustavoars@kernel.org, justinstitt@google.com,
linux-hardening@vger.kernel.org, patches@lists.linux.dev
Subject: Re: [PATCH 0/2] configs/hardening: Some fixes for UBSAN
Date: Mon, 15 Apr 2024 11:15:05 -0700 [thread overview]
Message-ID: <202404151110.8D4AD8E@keescook> (raw)
In-Reply-To: <20240411-fix-ubsan-in-hardening-config-v1-0-e0177c80ffaa@kernel.org>
On Thu, Apr 11, 2024 at 11:11:05AM -0700, Nathan Chancellor wrote:
> [ 0.189542] Internal error: UBSAN: unrecognized failure code: 00000000f2005515 [#1] PREEMPT SMP
Oops! Yes, I didn't update the (arm64) trap handler to notice integer
overflows. I think I need something like:
diff --git a/lib/ubsan.c b/lib/ubsan.c
index 5fc107f61934..a2fb19f75825 100644
--- a/lib/ubsan.c
+++ b/lib/ubsan.c
@@ -77,6 +77,14 @@ const char *report_ubsan_failure(struct pt_regs *regs, u32 check_type)
return "UBSAN: alignment assumption";
case ubsan_type_mismatch:
return "UBSAN: type mismatch";
+#endif
+#ifdef CONFIG_UBSAN_SIGNED_INTEGER_WRAP
+ case ubsan_add_overflow:
+ return "UBSAN: integer addition overflow";
+ case ubsan_sub_overflow:
+ return "UBSAN: integer subtraction overflow";
+ case ubsan_mul_overflow:
+ return "UBSAN: integer multiplication overflow";
#endif
default:
return "UBSAN: unrecognized failure code";
> [ 0.198326] Call trace:
> [ 0.198544] cancel_delayed_work+0x54/0x94
> [ 0.198810] deferred_probe_extend_timeout+0x20/0x6c
> [ 0.198988] driver_register+0xa8/0x10c
> [ 0.199122] __platform_driver_register+0x28/0x38
> [ 0.199258] tegra194_cbb_init+0x24/0x34
Justin, does this trace match anything you found running syzkaller
against SIO? (I assume not -- this seems to be a tegra code path...)
--
Kees Cook
next prev parent reply other threads:[~2024-04-15 18:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-11 18:11 [PATCH 0/2] configs/hardening: Some fixes for UBSAN Nathan Chancellor
2024-04-11 18:11 ` [PATCH 1/2] configs/hardening: Fix disabling UBSAN configurations Nathan Chancellor
2024-04-11 18:11 ` [PATCH 2/2] configs/hardening: Disable CONFIG_UBSAN_SIGNED_WRAP Nathan Chancellor
2024-04-15 18:09 ` [PATCH 0/2] configs/hardening: Some fixes for UBSAN Kees Cook
2024-04-15 18:15 ` Kees Cook [this message]
2024-04-15 18:32 ` Nathan Chancellor
2024-04-22 22:00 ` Justin Stitt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202404151110.8D4AD8E@keescook \
--to=keescook@chromium.org \
--cc=gustavoars@kernel.org \
--cc=justinstitt@google.com \
--cc=linux-hardening@vger.kernel.org \
--cc=nathan@kernel.org \
--cc=patches@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.