diff -Nru trace-cmd-2.6.1/debian/changelog trace-cmd-2.6.1/debian/changelog --- trace-cmd-2.6.1/debian/changelog 2017-09-12 22:50:27.000000000 +0300 +++ trace-cmd-2.6.1/debian/changelog 2021-12-17 13:59:33.000000000 +0200 @@ -1,3 +1,10 @@ +trace-cmd (2.6.1-0.1ubuntu1) bionic; urgency=medium + + * d/p/fix-lp1955129.patch : + - Fix buffer overflown in trace-cmd report (LP: #1955129) + + -- Ioanna Alifieraki Fri, 17 Dec 2021 13:59:33 +0200 + trace-cmd (2.6.1-0.1) unstable; urgency=medium * Non-maintainer upload. diff -Nru trace-cmd-2.6.1/debian/patches/fix-lp1955129.patch trace-cmd-2.6.1/debian/patches/fix-lp1955129.patch --- trace-cmd-2.6.1/debian/patches/fix-lp1955129.patch 1970-01-01 02:00:00.000000000 +0200 +++ trace-cmd-2.6.1/debian/patches/fix-lp1955129.patch 2021-12-17 13:59:22.000000000 +0200 @@ -0,0 +1,43 @@ +Author: Tony Jones +Origin: upstream, +Bug: https://lore.kernel.org/linux-trace-devel/20190807121446.1833-1-tz.stoyanov@gmail.com/ +Bug-Ubuntu: https://launchpad.net/bugs/1955129 +Subject: [PATCH] tools lib traceevent: Fix buffer overflow in arg_eval + +Backported from upstream commit 1375d98d8017e371776adbef10122a57ce2100e5 + +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 +Link: http://lore.kernel.org/linux-trace-devel/20190807121446.1833-1-tz.stoyanov@gmail.com +Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204517 + +Reported-by: Michael Sartain +Reported-by: Mathias Krause +Signed-off-by: Tony Jones +Acked-by: Steven Rostedt (VMware) +Cc: Frederic Weisbecker +Fixes: f7d82350e597 ("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 +Signed-off-by: Steven Rostedt (VMware) +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/event-parse.c ++++ b/event-parse.c +@@ -2429,7 +2429,7 @@ static int arg_num_eval(struct print_arg + static char *arg_eval (struct print_arg *arg) + { + long long val; +- static char buf[20]; ++ static char buf[24]; + + switch (arg->type) { + case PRINT_ATOM: diff -Nru trace-cmd-2.6.1/debian/patches/series trace-cmd-2.6.1/debian/patches/series --- trace-cmd-2.6.1/debian/patches/series 2016-07-17 15:40:56.000000000 +0300 +++ trace-cmd-2.6.1/debian/patches/series 2021-12-17 13:59:22.000000000 +0200 @@ -1 +1,2 @@ 0001-trace-cmd-Use-python2.7-for-executable-name.patch +fix-lp1955129.patch