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: <20191119223311.GD24290@kernel.org>
Date:   Tue, 19 Nov 2019 19:33:11 -0300
From:   Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     Alexey Budankov <alexey.budankov@...ux.intel.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Andi Kleen <ak@...ux.intel.com>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3] perf session: fix decompression of
 PERF_RECORD_COMPRESSED records

Em Tue, Nov 19, 2019 at 09:05:10PM +0100, Jiri Olsa escreveu:
> On Mon, Nov 18, 2019 at 05:21:03PM +0300, Alexey Budankov wrote:
> > 
> > Avoid termination of trace loading in case the last record in
> > the decompressed buffer partly resides in the following
> > mmaped PERF_RECORD_COMPRESSED record. In this case NULL value
> > returned by fetch_mmaped_event() means to proceed to the next
> > mmaped record then decompress it and load compressed events.
> > 
> > The issue can be reproduced like this:
> > 
> >   $ perf record -z -- some_long_running_workload
> >   $ perf report --stdio -vv
> >   decomp (B): 44519 to 163000
> >   decomp (B): 48119 to 174800
> >   decomp (B): 65527 to 131072
> >   fetch_mmaped_event: head=0x1ffe0 event->header_size=0x28, mmap_size=0x20000: fuzzed perf.data?
> >   Error:
> >   failed to process sample
> >   ...
> > 
> > Testing:
> > 
> >   71: Zstd perf.data compression/decompression              : Ok
> > 
> >   $ tools/perf/perf report -vv --stdio
> >   decomp (B): 59593 to 262160
> >   decomp (B): 4438 to 16512
> >   decomp (B): 285 to 880
> >   Looking at the vmlinux_path (8 entries long)
> >   Using vmlinux for symbols
> >   decomp (B): 57474 to 261248
> >   prefetch_event: head=0x3fc78 event->header_size=0x28, mmap_size=0x3fc80: fuzzed or compressed perf.data?
> >   decomp (B): 25 to 32
> >   decomp (B): 52 to 120
> >   ...
> > 
> > Fixes: 57fc032ad643 ("perf session: Avoid infinite loop when seeing invalid header.size")
> > Link: https://marc.info/?l=linux-kernel&m=156580812427554&w=2
> > Co-developed-by: Jiri Olsa <jolsa@...nel.org>
> > Signed-off-by: Alexey Budankov <alexey.budankov@...ux.intel.com>
> 
> Acked-by: Jiri Olsa <jolsa@...nel.org>

Thanks, applied.

- Arnaldo
 
> thanks,
> jirka

-- 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ