[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [Bug 1701808] [NEW] stack smashing in or after recvmsg syst
From: |
Bruno Haible |
Subject: |
[Qemu-devel] [Bug 1701808] [NEW] stack smashing in or after recvmsg system call in aarch64 user mode |
Date: |
Sat, 01 Jul 2017 12:15:06 -0000 |
Public bug reported:
A program that invokes recvmsg aborts with "*** stack smashing detected
***" when run in qemu-aarch64 (user mode), but works fine when running
on native aarch64 hardware.
How to reproduce:
$ aarch64-linux-gnu-gcc-5 -O -Wall /media/develdata/devel/qemu-bug/testpassfd.c
-static -DEXTRA_SPACE=0
$ QEMU_LD_PREFIX=/usr/aarch64-linux-gnu ~/inst-qemu/2.9.0/bin/qemu-aarch64
./a.out
*** stack smashing detected ***: ./a.out terminated
qemu: uncaught target signal 6 (Aborted) - core dumped
On native aarch64 hardware:
$ ./a.out
$ echo $?
0
The parameter EXTRA_SPACE can be used to add additional space to the
array that receives the recvmsg data. With -DEXTRA_SPACE=9 (or larger),
the program runs fine. Which suggests that recvmsg is storing up to 9
bytes more than allowed in memory.
** Affects: qemu
Importance: Undecided
Status: New
** Attachment added: "Test program"
https://bugs.launchpad.net/bugs/1701808/+attachment/4907339/+files/testpassfd.c
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1701808
Title:
stack smashing in or after recvmsg system call in aarch64 user mode
Status in QEMU:
New
Bug description:
A program that invokes recvmsg aborts with "*** stack smashing
detected ***" when run in qemu-aarch64 (user mode), but works fine
when running on native aarch64 hardware.
How to reproduce:
$ aarch64-linux-gnu-gcc-5 -O -Wall
/media/develdata/devel/qemu-bug/testpassfd.c -static -DEXTRA_SPACE=0
$ QEMU_LD_PREFIX=/usr/aarch64-linux-gnu ~/inst-qemu/2.9.0/bin/qemu-aarch64
./a.out
*** stack smashing detected ***: ./a.out terminated
qemu: uncaught target signal 6 (Aborted) - core dumped
On native aarch64 hardware:
$ ./a.out
$ echo $?
0
The parameter EXTRA_SPACE can be used to add additional space to the
array that receives the recvmsg data. With -DEXTRA_SPACE=9 (or
larger), the program runs fine. Which suggests that recvmsg is storing
up to 9 bytes more than allowed in memory.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1701808/+subscriptions
- [Qemu-devel] [Bug 1701808] [NEW] stack smashing in or after recvmsg system call in aarch64 user mode,
Bruno Haible <=