android_kernel_oneplus_msm8998/tools/lib
Tony Jones be8e9e9ebf tools lib traceevent: Fix buffer overflow in arg_eval
[ Upstream commit 7c5b019e3a638a5a290b0ec020f6ca83d2ec2aaa ]

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-27 09:33:49 +02:00
..
api tools lib api fs: No need to use PATH_MAX + 1 2015-10-05 16:12:09 -03:00
bpf tools/libbpf: handle issues with bpf ELF objects containing .eh_frames 2018-05-30 07:48:57 +02:00
lockdep tools/lib/lockdep: Reduce MAX_LOCK_DEPTH to avoid overflowing lock_chain/: Depth 2017-07-21 07:44:56 +02:00
symbol tools lib symbol: Introduce kallsyms2elf_type 2015-09-30 18:34:31 -03:00
traceevent tools lib traceevent: Fix buffer overflow in arg_eval 2019-04-27 09:33:49 +02:00
util tools lib: Move asm-generic/bitops/find.h code to tools/include and tools/lib 2014-12-17 11:14:48 -03:00
hweight.c tools: Copy lib/hweight.c from the kernel sources 2015-07-09 16:29:56 -03:00
rbtree.c tools: Copy lib/rbtree.c to tools/lib/ 2015-07-05 22:48:21 -03:00