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: <20180426171343.630332329e9998a1ef617851@kernel.org>
Date:   Thu, 26 Apr 2018 17:13:43 +0900
From:   Masami Hiramatsu <mhiramat@...nel.org>
To:     Masami Hiramatsu <mhiramat@...nel.org>
Cc:     linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
        Ingo Molnar <mingo@...hat.com>,
        "H . Peter Anvin" <hpa@...or.com>, x86@...nel.org,
        Ananth N Mavinakayanahalli <ananth@...ibm.com>,
        Anil S Keshavamurthy <anil.s.keshavamurthy@...el.com>,
        "David S . Miller" <davem@...emloft.net>,
        Jon Medhurst <tixy@...aro.org>,
        Will Deacon <will.deacon@....com>,
        Arnd Bergmann <arnd@...db.de>,
        David Howells <dhowells@...hat.com>,
        Heiko Carstens <heiko.carstens@...ibm.com>,
        "Tobin C . Harding" <me@...in.cc>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Thomas Richter <tmricht@...ux.ibm.com>,
        akpm@...ux-foundation.org, acme@...nel.org, rostedt@...dmis.org,
        brueckner@...ux.vnet.ibm.com, schwidefsky@...ibm.com,
        stable@...r.kernel.org
Subject: Re: [PATCH -tip v2 0/7] kprobes: Fix %p in kprobes

On Thu, 26 Apr 2018 17:08:00 +0900
Masami Hiramatsu <mhiramat@...nel.org> wrote:

> Hi,
> 
> This 2nd version of the series which fixes %p uses in kprobes.
> Some by replacing with %pS, some by replacing with %px but
> masking with kallsyms_show_value().

Oops, I missed to porting this on tip tree, but since this is
including some other archs, it can go directly to each trees
or linus tree.

Anyway, those should be cleanly applicable for the latest
linus tree too.

Thanks,

> 
> V1 series is here:
>  https://lkml.org/lkml/2018/1/25/1
> 
> I've read the thread about %pK and if I understand correctly
> we shouldn't print kernel addresses. However, kprobes debugfs
> interface can not stop to show the actual probe address because
> it should be compared with addresses in kallsyms for debugging.
> So, it depends on that kallsyms_show_value() allows to show
> address to user, because if it returns true, anyway that user
> can dump /proc/kallsyms.
> 
> Other error messages are replaced it with %pS, and one critical
> function uses %px which is called right before BUG().
> 
> Also, I tried to fix this issue on each arch port. I searched
> it by
> 
>  # find arch/* | grep -e 'kprobe.*c' | xargs grep -w %p
> 
> And fixed all %p uses in those files.
> 
> Changes in this version;
>  - [1/7] is newly added.
>  - patches for MN10300(deleted) and s390(merged) are removed.
> 
> Thank you,
> 
> ---
> 
> Masami Hiramatsu (7):
>       kprobes: Make blacklist root user read only
>       kprobes: Show blacklist addresses as same as kallsyms does
>       kprobes: Show address of kprobes if kallsyms does
>       kprobes: Replace %p with other pointer types
>       kprobes/x86: Fix %p uses in error messages
>       kprobes/arm: Fix %p uses in error messages
>       kprobes/arm64: Fix %p uses in error messages
> 
> 
>  arch/arm/probes/kprobes/core.c      |   10 ++++----
>  arch/arm/probes/kprobes/test-core.c |    1 -
>  arch/arm64/kernel/probes/kprobes.c  |    4 ++-
>  arch/x86/kernel/kprobes/core.c      |   12 +++------
>  kernel/kprobes.c                    |   46 ++++++++++++++++++++++-------------
>  5 files changed, 40 insertions(+), 33 deletions(-)
> 
> --
> Masami Hiramatsu (Linaro) <mhiramat@...nel.org>


-- 
Masami Hiramatsu <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ