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]
Date:   Wed, 19 Jun 2019 14:31:28 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     "Rantala, Tommi T. (Nokia - FI/Espoo)" <tommi.t.rantala@...ia.com>
Cc:     "stable@...r.kernel.org" <stable@...r.kernel.org>,
        Arnaldo Carvalho de Melo <acme@...hat.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 4.14] perf machine: Guard against NULL in machine__exit()

On Wed, Jun 19, 2019 at 12:00:46PM +0000, Rantala, Tommi T. (Nokia - FI/Espoo) wrote:
> From: Arnaldo Carvalho de Melo <acme@...hat.com>
> 
> commit 4a2233b194c77ae1ea8304cb7c00b551de4313f0 upstream.
> 
> A recent fix for 'perf trace' introduced a bug where
> machine__exit(trace->host) could be called while trace->host was still
> NULL, so make this more robust by guarding against NULL, just like
> free() does.
> 
> The problem happens, for instance, when !root users try to run 'perf
> trace':
> 
>   [acme@...et linux]$ trace
>   Error:	No permissions to read /sys/kernel/debug/tracing/events/raw_syscalls/sys_(enter|exit)
>   Hint:	Try 'sudo mount -o remount,mode=755 /sys/kernel/debug/tracing'
> 
>   perf: Segmentation fault
>   Obtained 7 stack frames.
>   [0x4f1b2e]
>   /lib64/libc.so.6(+0x3671f) [0x7f43a1dd971f]
>   [0x4f3fec]
>   [0x47468b]
>   [0x42a2db]
>   /lib64/libc.so.6(__libc_start_main+0xe9) [0x7f43a1dc3509]
>   [0x42a6c9]
>   Segmentation fault (core dumped)
>   [acme@...et linux]$
> 
> Cc: Adrian Hunter <adrian.hunter@...el.com>
> Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
> Cc: Andrei Vagin <avagin@...nvz.org>
> Cc: David Ahern <dsahern@...il.com>
> Cc: Jiri Olsa <jolsa@...nel.org>
> Cc: Namhyung Kim <namhyung@...nel.org>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Cc: Vasily Averin <vvs@...tuozzo.com>
> Cc: Wang Nan <wangnan0@...wei.com>
> Fixes: 33974a414ce2 ("perf trace: Call machine__exit() at exit")
> Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
> Signed-off-by: Tommi Rantala <tommi.t.rantala@...ia.com>
> ---
>  tools/perf/util/machine.c | 3 +++
>  1 file changed, 3 insertions(+)

Now applied, thanks.

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ