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: <CAK7LNATbtrKTgNcoBu=o6rNDmjW4Fdc+2spgZZr52YV2axyfMA@mail.gmail.com>
Date:   Thu, 18 Aug 2022 13:19:16 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     Nick Desaulniers <ndesaulniers@...gle.com>
Cc:     Guru Das Srinagesh <quic_gurus@...cinc.com>,
        Nathan Chancellor <nathan@...nel.org>,
        Tom Rix <trix@...hat.com>,
        Elliot Berman <quic_eberman@...cinc.com>,
        clang-built-linux <llvm@...ts.linux.dev>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] scripts/clang-tools: Remove DeprecatedOrUnsafeBufferHandling
 check

On Thu, Aug 18, 2022 at 8:40 AM Nick Desaulniers
<ndesaulniers@...gle.com> wrote:
>
> On Thu, Aug 4, 2022 at 10:46 AM Guru Das Srinagesh
> <quic_gurus@...cinc.com> wrote:
> >
> > This `clang-analyzer` check flags the use of memset(), suggesting a more
> > secure version of the API, such as memset_s(), which does not exist in
> > the kernel:
> >
> >   warning: Call to function 'memset' is insecure as it does not provide
> >   security checks introduced in the C11 standard. Replace with analogous
> >   functions that support length arguments or provides boundary checks such
> >   as 'memset_s' in case of C11
> >   [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
> >
> > Signed-off-by: Guru Das Srinagesh <quic_gurus@...cinc.com>
> > ---
> >  scripts/clang-tools/run-clang-tools.py | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/scripts/clang-tools/run-clang-tools.py b/scripts/clang-tools/run-clang-tools.py
> > index f754415a..1337ced 100755
> > --- a/scripts/clang-tools/run-clang-tools.py
> > +++ b/scripts/clang-tools/run-clang-tools.py
> > @@ -51,6 +51,7 @@ def run_analysis(entry):
> >          checks += "linuxkernel-*"
> >      else:
> >          checks += "clang-analyzer-*"
> > +        checks += ",-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling"
>
> Thanks for the patch! I think it makes sense to add this.  I suspect
> the list of checks we might want to disable may grow. Maybe when it
> does, we could put these in an array and join them at the end.
>
> Anyways, LGTM
> Reviewed-by: Nick Desaulniers <ndesaulniers@...gle.com>
>
> Masahiro, would you mind picking this up for us, please?




Sure.
Applied to linux-kbuild/fixes.
Thanks.





> >      p = subprocess.run(["clang-tidy", "-p", args.path, checks, entry["file"]],
> >                         stdout=subprocess.PIPE,
> >                         stderr=subprocess.STDOUT,
> > --
> > 2.7.4
> >
>
>
> --
> Thanks,
> ~Nick Desaulniers



-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ