kernel-hardening.lists.openwall.com archive mirror
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: "Tobin C. Harding" <me@tobin.cc>
Cc: LKML <linux-kernel@vger.kernel.org>,
	kernel-hardening@lists.openwall.com, kaiwan.billimoria@gmail.com
Subject: [kernel-hardening] Re: [PATCH] leaking_addresses: add files to skip
Date: Fri, 5 Jan 2018 16:11:07 -0800	[thread overview]
Message-ID: <CAGXu5jJ1SfKmTtwN6JS42cXWN6v=pPrEyfcdJRH+=MTmh5hPKQ@mail.gmail.com> (raw)
In-Reply-To: <1515193172-20279-1-git-send-email-me@tobin.cc>

On Fri, Jan 5, 2018 at 2:59 PM, Tobin C. Harding <me@tobin.cc> wrote:
> Script currently times out when parsing the following files:
>
>         /proc/kallsyms
>         /proc/sched_debug
>         /proc/PID/smaps

Seems like kallsyms would be one to absolutely scan... it shouldn't
cause hangs either.

-Kees

>
> None of these files leak kernel addresses. We can skip parsing them.
>
> Add entries to list of files to skip.
>
> Signed-off-by: Tobin C. Harding <me@tobin.cc>
> ---
>  scripts/leaking_addresses.pl | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/leaking_addresses.pl b/scripts/leaking_addresses.pl
> index ce5d58f3e619..32e2fc9fc8c3 100755
> --- a/scripts/leaking_addresses.pl
> +++ b/scripts/leaking_addresses.pl
> @@ -58,7 +58,9 @@ my @skip_parse_files_abs = ('/proc/kmsg',
>                             '/sys/firmware/devicetree',
>                             '/proc/device-tree',
>                             '/sys/kernel/debug/tracing/trace_pipe',
> -                           '/sys/kernel/security/apparmor/revision');
> +                           '/sys/kernel/security/apparmor/revision',
> +                           '/proc/kallsyms',
> +                           '/proc/sched_debug');
>
>  # Do not parse these files under any subdirectory.
>  my @skip_parse_files_any = ('0',
> @@ -71,7 +73,8 @@ my @skip_parse_files_any = ('0',
>                             'snapshot_raw',
>                             'trace_pipe_raw',
>                             'ptmx',
> -                           'trace_pipe');
> +                           'trace_pipe',
> +                           'smaps');
>
>  # Do not walk these directories (absolute path).
>  my @skip_walk_dirs_abs = ();
> --
> 2.7.4
>



-- 
Kees Cook
Pixel Security

  reply	other threads:[~2018-01-06  0:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-05 22:59 [kernel-hardening] [PATCH] leaking_addresses: add files to skip Tobin C. Harding
2018-01-06  0:11 ` Kees Cook [this message]
2018-01-06  1:37   ` [kernel-hardening] " Tobin C. Harding

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAGXu5jJ1SfKmTtwN6JS42cXWN6v=pPrEyfcdJRH+=MTmh5hPKQ@mail.gmail.com' \
    --to=keescook@chromium.org \
    --cc=kaiwan.billimoria@gmail.com \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=me@tobin.cc \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).