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>] [day] [month] [year] [list]
Message-ID: <Z2STgyD1p456Qqhg@google.com>
Date: Thu, 19 Dec 2024 13:43:31 -0800
From: Namhyung Kim <namhyung@...nel.org>
To: Arnaldo Carvalho de Melo <acme@...nel.org>,
	Ian Rogers <irogers@...gle.com>,
	Kan Liang <kan.liang@...ux.intel.com>
Cc: Jiri Olsa <jolsa@...nel.org>, Adrian Hunter <adrian.hunter@...el.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...nel.org>, LKML <linux-kernel@...r.kernel.org>,
	linux-perf-users@...r.kernel.org,
	Howard Chu <howardchu95@...il.com>
Subject: [BUG] perf trace: Unaligned access in timespec

Hello,

I found perf trace is getting core dump due to illegal instruction by
misaligned pointer access.  It seems to come with the new clang changes
and I got this UBsan message.

  $ sudo ./perf trace -a sleep 1
  ...
  tools/perf/trace/beauty/timespec.c:10:64: runtime error: member access within misaligned address
  					  0x7f57636105e4 for type 'struct augmented_arg',
  					  which requires 8 byte alignment
  0x7f57636105e4: note: pointer points here
    ad 7f 00 00 10 00 00 00  00 00 00 00 01 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
                ^ 
      #0 0x5637d68d0ed7 in syscall_arg__scnprintf_augmented_timespec tools/perf/trace/beauty/timespec.c:10:64
      #1 0x5637d68d0ed7 in syscall_arg__scnprintf_timespec tools/perf/trace/beauty/timespec.c:18:10
      #2 0x5637d688dfef in syscall_arg_fmt__scnprintf_val tools/perf/builtin-trace.c:2316:10
      #3 0x5637d688dfef in syscall__scnprintf_args tools/perf/builtin-trace.c:2394:15
      #4 0x5637d68838ee in trace__sys_enter tools/perf/builtin-trace.c:2675:13
      #5 0x5637d688ec8c in trace__handle_event tools/perf/builtin-trace.c:3495:3
      #6 0x5637d688ec8c in __trace__deliver_event tools/perf/builtin-trace.c:4045:3
      #7 0x5637d6886841 in trace__deliver_event tools/perf/builtin-trace.c:4072:10
      #8 0x5637d6886841 in trace__run tools/perf/builtin-trace.c:4432:10
      #9 0x5637d688112b in cmd_trace tools/perf/builtin-trace.c:5521:9
      #10 0x5637d67af002 in run_builtin tools/perf/perf.c:351:11
      #11 0x5637d67aee36 in handle_internal_command tools/perf/perf.c:404:8
      #12 0x5637d67ae76e in run_argv tools/perf/perf.c:448:2
      #13 0x5637d67ae76e in main tools/perf/perf.c:562:3
      #14 0x7f576498a3d3 in __libc_start_main (/usr/lib64/libc.so.6+0x613d3)
      #15 0x5637d6793f69 in _start /usr/src/csu/../sysdeps/x86_64/start.S:120
  
  SUMMARY: UndefinedBehaviorSanitizer: misaligned-pointer-use tools/perf/trace/beauty/timespec.c:10:64

Thanks,
Namhyung


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ