lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANpmjNOciiDNkWDrkQ+BEgAj=rSYGQAuHVS1DTDfvPHSbAndoA@mail.gmail.com>
Date:   Fri, 17 Feb 2023 00:52:03 +0100
From:   Marco Elver <elver@...gle.com>
To:     Alexander Potapenko <glider@...gle.com>
Cc:     Naresh Kamboju <naresh.kamboju@...aro.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Jakub Jelinek <jakub@...hat.com>,
        Peter Collingbourne <pcc@...gle.com>,
        kasan-dev <kasan-dev@...glegroups.com>,
        open list <linux-kernel@...r.kernel.org>,
        kunit-dev@...glegroups.com, lkft-triage@...ts.linaro.org,
        regressions@...ts.linux.dev,
        Anders Roxell <anders.roxell@...aro.org>,
        Arnd Bergmann <arnd@...db.de>,
        Andrey Konovalov <andreyknvl@...il.com>
Subject: Re: next: x86_64: kunit test crashed and kernel panic

On Thu, 16 Feb 2023 at 19:59, Alexander Potapenko <glider@...gle.com> wrote:
>
> >
> > > <4>[   38.796558]  ? kmalloc_memmove_negative_size+0xeb/0x1f0
> > > <4>[   38.797376]  ? __pfx_kmalloc_memmove_negative_size+0x10/0x10
> >
> > Most certainly kmalloc_memmove_negative_size() is related.
> > Looks like we fail to intercept the call to memmove() in this test,
> > passing -2 to the actual __memmove().
>
> This was introduced by 69d4c0d321869 ("entry, kasan, x86: Disallow
> overriding mem*() functions")

Ah, thanks!

> There's Marco's "kasan: Emit different calls for instrumentable
> memintrinsics", but it doesn't fix the problem for me (looking
> closer...), and GCC support is still not there, right?

Only Clang 15 supports it at this point. Some future GCC will support it.

> Failing to intercept memcpy/memset/memmove should normally result in
> false negatives, but kmalloc_memmove_negative_size() makes a strong
> assumption that KASAN will catch and prevent memmove(dst, src, -2).

Ouch - ok, so we need to skip these tests if we know memintrinsics
aren't instrumented.

I've sent a series here:
https://lore.kernel.org/all/20230216234522.3757369-1-elver@google.com/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ