linux-stable/tools
Tony Jones 224c996e48 tools lib traceevent: Fix buffer overflow in arg_eval
[ Upstream commit 7c5b019e3a ]

Fix buffer overflow observed when running perf test.

The overflow is when trying to evaluate "1ULL << (64 - 1)" which is
resulting in -9223372036854775808 which overflows the 20 character
buffer.

If is possible this bug has been reported before but I still don't see
any fix checked in:

See: https://www.spinics.net/lists/linux-perf-users/msg07714.html

Reported-by: Michael Sartain <mikesart@fastmail.com>
Reported-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Tony Jones <tonyj@suse.de>
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Fixes: f7d82350e5 ("tools/events: Add files to create libtraceevent.a")
Link: http://lkml.kernel.org/r/20190228015532.8941-1-tonyj@suse.de
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-04-05 22:33:00 +02:00
..
accounting
arch tools uapi: fix RISC-V 64-bit support 2019-02-20 10:25:39 +01:00
bpf bpftool: fix percpu maps updating 2019-03-13 14:02:34 -07:00
build perf build: Don't unconditionally link the libbfd feature test to -liberty and -lz 2019-02-12 19:47:16 +01:00
cgroup
firewire
gpio
hv Tools: hv: kvp: Fix a warning of buffer overflow with gcc 8.0.1 2019-02-12 19:46:59 +01:00
iio tools: iio: iio_generic_buffer: make num_loops signed 2019-02-15 08:10:10 +01:00
include tools uapi: fix Alpha support 2019-02-20 10:25:45 +01:00
kvm/kvm_stat tools/kvm_stat: cut down decimal places in update interval dialog 2018-10-01 15:40:59 +02:00
laptop
leds
lib tools lib traceevent: Fix buffer overflow in arg_eval 2019-04-05 22:33:00 +02:00
memory-model tools/memory-model: Rename litmus tests to comply to norm7 2018-07-17 09:30:36 +02:00
nfsd
objtool objtool: Query pkg-config for libelf location 2019-04-03 06:26:28 +02:00
pci tools: PCI: Add MSI-X support 2018-07-19 11:47:13 +01:00
pcmcia
perf perf c2c: Fix c2c report for empty numa node 2019-04-05 22:32:57 +02:00
power tools/power/x86/intel_pstate_tracer: Fix non root execution for post processing a trace file 2019-02-12 19:47:12 +01:00
scripts Kbuild: fix # escaping in .cmd files for future Make 2018-04-11 00:03:02 +09:00
spi
testing selftests: fib_tests: sleep after changing carrier. again. 2019-03-23 20:09:52 +01:00
thermal/tmon tools/thermal: tmon: fix for segfault 2018-03-27 09:51:23 +02:00
time
usb tools: usb: ffs-test: Fix build on big endian systems 2018-07-17 10:12:51 +03:00
virtio virtio: fix test build after uio.h change 2019-01-13 09:51:03 +01:00
vm tools/vm/page-types.c: fix "defined but not used" warning 2018-09-04 16:45:02 -07:00
wmi
Makefile