open-power-host-os / qemu

OpenPOWER Host OS qemu repository
Other
2 stars 3 forks source link

numastat crashes with buffer overflow #30

Closed nasastry closed 6 years ago

nasastry commented 6 years ago
Mirrored with LTC bug https://bugzilla.linux.ibm.com/show_bug.cgi?id=161559 When given numastat it crashes with the following stack. ``` Running 'numastat 105023' [stderr] *** buffer overflow detected ***: numastat terminated [stdout] Command 'numastat 105023' finished with -6 after 0.00220608711243s [stderr] ======= Backtrace: ========= [stdout] Per-node process memory usage (in MBs) for PID 105023 (qemu-system-ppc) [stderr] /lib64/libc.so.6(__fortify_fail+0x54)[0x7fff9ebd7454] [stdout] [stderr] /lib64/libc.so.6(__chk_fail+0x20)[0x7fff9ebd40e0] [stdout] [stderr] /lib64/libc.so.6(__memset_chk+0x218)[0x7fff9ebd2a78] [stderr] numastat[0x10002748] [stderr] numastat[0x10002ad8] [stderr] numastat[0x10003064] [stderr] numastat[0x10004424] [stderr] numastat[0x100014c4] [stderr] /lib64/libc.so.6(+0x24980)[0x7fff9eab4980] [stderr] /lib64/libc.so.6(__libc_start_main+0xc4)[0x7fff9eab4b74] [stderr] ======= Memory map: ======== [stderr] 10000000-10010000 r-xp 00000000 fd:00 1450184 /usr/bin/numastat [stderr] 10010000-10020000 r--p 00000000 fd:00 1450184 /usr/bin/numastat [stderr] 10020000-10030000 rw-p 00010000 fd:00 1450184 /usr/bin/numastat [stderr] 20a60000-20a90000 rw-p 00000000 00:00 0 [heap] [stderr] 7fff9ea90000-7fff9ec60000 r-xp 00000000 fd:00 1442536 /usr/lib64/libc-2.17.so [stderr] 7fff9ec60000-7fff9ec70000 r--p 001c0000 fd:00 1442536 /usr/lib64/libc-2.17.so [stderr] 7fff9ec70000-7fff9ec80000 rw-p 001d0000 fd:00 1442536 /usr/lib64/libc-2.17.so [stderr] 7fff9ec80000-7fff9eca0000 rw-p 00000000 00:00 0 [stderr] 7fff9eca0000-7fff9ecc0000 r-xp 00000000 00:00 0 [vdso] [stderr] 7fff9ecc0000-7fff9ecf0000 r-xp 00000000 fd:00 1462533 /usr/lib64/ld-2.17.so [stderr] 7fff9ecf0000-7fff9ed00000 r--p 00020000 fd:00 1462533 /usr/lib64/ld-2.17.so [stderr] 7fff9ed00000-7fff9ed10000 rw-p 00030000 fd:00 1462533 /usr/lib64/ld-2.17.so [stderr] 7fffda660000-7fffda690000 rw-p 00000000 00:00 0 [stack] ``` \# rpm -qf `which numastat` numactl-2.0.9-6.el7_2.ppc64le \# cat /etc/os-release NAME="CentOS Linux" VERSION="7 (AltArch)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7 (AltArch)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:7" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/" SIG_FAMILY="AltArch ppc64le" CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7" \# uname -a Linux zzfp365-lp1.aus.stglabs.ibm.com 4.13.0-4.rel.git49564cb.el7.centos.ppc64le #1 SMP Fri Sep 22 22:49:59 -03 2017 ppc64le ppc64le ppc64le GNU/Linux Upstream patch which fixes this issue is there at https://www.spinics.net/lists/linux-numa/msg01169.html
cdeadmin commented 6 years ago

------- Comment From sthoufee@in.ibm.com 2017-11-21 23:28:23 EDT------- Yes.

Following commit would fix this issue.

https://github.com/numactl/numactl/commit/b608687037d873ad82d6318f231b3d6612e8601d

cdeadmin commented 6 years ago

------- Comment From seg@us.ibm.com 2018-06-06 11:33:38 EDT------- We will rebase soon. I see no particular reason to keep this open, so moving to closed state.