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] [day] [month] [year] [list]
Message-ID: <CAG_fn=VumGCGWKf7M7HWU5nKDHAcksqjYeBq0hXVd_k=anmn0A@mail.gmail.com>
Date: Fri, 26 Apr 2024 11:09:06 +0200
From: Alexander Potapenko <glider@...gle.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: elver@...gle.com, dvyukov@...gle.com, ojeda@...nel.org, 
	linux-kernel@...r.kernel.org, 
	syzbot+355c5bb8c1445c871ee8@...kaller.appspotmail.com
Subject: Re: [PATCH] kmsan: compiler_types: declare __no_sanitize_or_inline

On Thu, Apr 25, 2024 at 10:31 PM Andrew Morton
<akpm@...ux-foundation.org> wrote:
>
> On Thu, 25 Apr 2024 11:28:59 +0200 Alexander Potapenko <glider@...gle.com> wrote:
>
> > It turned out that KMSAN instruments READ_ONCE_NOCHECK(), resulting in
> > false positive reports, because __no_sanitize_or_inline enforced inlining.
> >
> > Properly declare __no_sanitize_or_inline under __SANITIZE_MEMORY__,
> > so that it does not inline the annotated function.

As Marco noted above, we may want to rephrase it as:

  Properly declare __no_sanitize_or_inline under __SANITIZE_MEMORY__,
  so that it does not __always_inline the annotated function.

Let me know if I need to send a v2.

> > Reported-by: syzbot+355c5bb8c1445c871ee8@...kaller.appspotmail.com
>
> I'll add
>
> Link: https://lkml.kernel.org/r/000000000000826ac1061675b0e3@google.com
>
> And I think a cc:stable is justifiable.

Agreed.

> A Fixes: target would be nice?

Hmm, the introduction of READ_ONCE_NOCHECK predates KMSAN.
We could do:
  Fixes: 5de0ce85f5a4d ("kmsan: mark noinstr as __no_sanitize_memory")

, because that commit should have introduced __no_sanitize_or_inline for KMSAN.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ