Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

numastat crashes with buffer overflow #30

Closed
nasastry opened this issue Nov 21, 2017 · 2 comments
Closed

numastat crashes with buffer overflow #30

nasastry opened this issue Nov 21, 2017 · 2 comments

Comments

@nasastry
Copy link

nasastry commented Nov 21, 2017

cde:info Mirrored with LTC bug https://bugzilla.linux.ibm.com/show_bug.cgi?id=161559 </cde:info>

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
Copy link

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

Following commit would fix this issue.

numactl/numactl@b608687

@cdeadmin cdeadmin closed this as completed Jun 6, 2018
@cdeadmin
Copy link

cdeadmin commented Jun 6, 2018

------- 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants