Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1589894

Re: [PATCH] checkpatch: Add ability to find bad uses of vsprintf %p<foo> extensions

From Joe Perches <joe@perches.com>
Newsgroups linux.kernel
Subject Re: [PATCH] checkpatch: Add ability to find bad uses of vsprintf %p<foo> extensions
Date 2017-03-01 01:20 +0100
Message-ID <tg09Q-3hb-5@gated-at.bofh.it> (permalink)
References <tfwls-86h-13@gated-at.bofh.it> <tfAyL-2v1-33@gated-at.bofh.it> <tg09Q-3hb-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, 2017-02-28 at 16:06 -0800, Andrew Morton wrote:
> On Mon, 27 Feb 2017 12:54:55 -0800 Joe Perches <joe@perches.com> wrote:
> 
> > %pK was at least once misused at %pk in an out-of-tree module.
> > This lead to some security concerns.  Add the ability to track
> > single and multiple line statements for misuses of %p<foo>.
> 
> Should we also do this?
> 
> --- a/lib/vsprintf.c~checkpatch-add-ability-to-find-bad-uses-of-vsprintf-%pfoo-extensions-fix
> +++ a/lib/vsprintf.c
> @@ -1477,6 +1477,9 @@ int kptr_restrict __read_mostly;
>   * by an extra set of alphanumeric characters that are extended format
>   * specifiers.
>   *
> + * Please update scripts/checkpatch.pl when adding new conversion characters.
> + * (search for "check for vsprintf extension").
> + *

Seems sensible, thanks.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

RE: [PATCH] checkpatch: add warning on %pk instead of %pK usage "Roberts, William C" <william.c.roberts@intel.com> - 2017-02-13 20:50 +0100
  Re: [PATCH] checkpatch: add warning on %pk instead of %pK usage Joe Perches <joe@perches.com> - 2017-02-13 21:20 +0100
  Re: [PATCH] checkpatch: add warning on %pk instead of %pK usage Joe Perches <joe@perches.com> - 2017-02-13 23:30 +0100
    RE: [PATCH] checkpatch: add warning on %pk instead of %pK usage "Roberts, William C" <william.c.roberts@intel.com> - 2017-02-16 00:50 +0100
      Re: [PATCH] checkpatch: add warning on %pk instead of %pK usage Joe Perches <joe@perches.com> - 2017-02-16 01:30 +0100
      RE: [PATCH] checkpatch: add warning on %pk instead of %pK usage "Roberts, William C" <william.c.roberts@intel.com> - 2017-02-27 17:30 +0100
        [PATCH] checkpatch: Add ability to find bad uses of vsprintf %p<foo> extensions Joe Perches <joe@perches.com> - 2017-02-27 22:00 +0100
          Re: [kernel-hardening] [PATCH] checkpatch: Add ability to find bad  uses of vsprintf %p<foo> extensions Kees Cook <keescook@chromium.org> - 2017-02-27 22:40 +0100
          RE: [PATCH] checkpatch: Add ability to find bad uses of vsprintf  %p<foo> extensions "Roberts, William C" <william.c.roberts@intel.com> - 2017-02-28 16:40 +0100
          Re: [PATCH] checkpatch: Add ability to find bad uses of vsprintf  %p<foo> extensions Joe Perches <joe@perches.com> - 2017-03-01 01:20 +0100
          Re: [kernel-hardening] Re: [PATCH] checkpatch: Add ability to find  bad uses of vsprintf %p<foo> extensions Kees Cook <keescook@chromium.org> - 2017-03-01 01:20 +0100
            Re: [kernel-hardening] Re: [PATCH] checkpatch: Add ability to find  bad uses of vsprintf %p<foo> extensions Joe Perches <joe@perches.com> - 2017-03-01 02:30 +0100
          Re: [PATCH] checkpatch: Add ability to find bad uses of vsprintf  %p<foo> extensions Andrew Morton <akpm@linux-foundation.org> - 2017-03-01 03:10 +0100

csiph-web