[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACT4Y+bL3sEE6edPmFkW3zbac4D9+9c19jCNRysXohWx+7=Lzw@mail.gmail.com>
Date: Thu, 7 Jan 2021 11:51:24 +0100
From: Dmitry Vyukov <dvyukov@...gle.com>
To: Kees Cook <keescook@...omium.org>
Cc: Peter Zijlstra <peterz@...radead.org>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
LKML <linux-kernel@...r.kernel.org>,
Randy Dunlap <rdunlap@...radead.org>,
Andrey Ryabinin <aryabinin@...tuozzo.com>
Subject: Re: [PATCH] mm/uaccess: Use 'unsigned long' to placate UBSAN
warnings, again
On Thu, Jan 7, 2021 at 12:37 AM Kees Cook <keescook@...omium.org> wrote:
>
> On Mon, Jan 04, 2021 at 04:13:17PM +0100, Peter Zijlstra wrote:
> > On Tue, Dec 22, 2020 at 11:04:54PM -0600, Josh Poimboeuf wrote:
> > > GCC 7 has a known bug where UBSAN ignores '-fwrapv' and generates false
> > > signed-overflow-UB warnings. The type mismatch between 'i' and
> > > 'nr_segs' in copy_compat_iovec_from_user() is causing such a warning,
> > > which also happens to violate uaccess rules:
> > >
> > > lib/iov_iter.o: warning: objtool: iovec_from_user()+0x22d: call to __ubsan_handle_add_overflow() with UACCESS enabled
> > >
> > > Fix it by making the variable types match.
> > >
> > > This is similar to a previous commit:
> > >
> > > 29da93fea3ea ("mm/uaccess: Use 'unsigned long' to placate UBSAN warnings on older GCC versions")
> >
> > Maybe it's time we make UBSAN builds depend on GCC-8+ ?
>
> I would be totally fine with that. The only thing I can think of that
> might care is syzbot. Dmitry, does syzbot use anything older than gcc 8?
syzbot should use gcc 10 everywhere by now (and if not, we will update).
And in general I think it's a reasonable requirement today.
Powered by blists - more mailing lists