[PATCH 0/2] trace-cmd lib: Fix potential integer overflows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jaroslav Jindrak <jjindrak@xxxxxxx>

There are two possible integer overflows in libtracecmd when reading
CPU data from a file. The first one can cause the size returned by
stat() to overflow when assigned from off_t to an int, which can then
lead to a the read_size and the file size not matching. The second one
occurs when printing such an error because we use %lld to print an
unsigned long long int. These two overflows can lead to a situation
such as this:

libtracecmd: Invalid argument
  did not match size of 3451486208 to -843481088

Jaroslav Jindrak (2):
  trace-cmd lib: Fix potential integer overflow in
    tracecmd_write_cpu_data()
  trace-cmd lib: Use proper printf format specifiers

 lib/trace-cmd/include/trace-cmd-local.h | 2 +-
 lib/trace-cmd/trace-output.c            | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.37.1





[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux