diff options
| author | Wesley W. Terpstra | 2011-07-12 13:38:22 +0200 |
|---|---|---|
| committer | Riku Voipio | 2011-07-12 13:38:22 +0200 |
| commit | 95b33b2f4f0293068d1a42b3ab5badcc6333c6ba (patch) | |
| tree | 3f4ef76d5a8b48ef6f0997ec826d92d92918232b /linux-user/syscall_defs.h | |
| parent | mips: null pointer deref should segfault (diff) | |
| download | qemu-95b33b2f4f0293068d1a42b3ab5badcc6333c6ba.tar.gz qemu-95b33b2f4f0293068d1a42b3ab5badcc6333c6ba.tar.xz qemu-95b33b2f4f0293068d1a42b3ab5badcc6333c6ba.zip | |
mips: rlimit incorrectly converts values
Byte swap was applied in the wrong order with testing for
RLIM_INFINITY. On mips bigendian from an amd64 system this results in
infinity being misinterpretted as 2^31-1.
This is a serious bug because it causes setrlimit stack size to kill
all child processes. This means (for example) that 'make' can run no
children. The mechanism of failure:
1. parent sets stack size rlimit to 'infinity'
2. qemu screws this value up
3. child process fetches stack size as a large (but non-infinite) value
4. qemu tries to allocate stack before execution
5. stack allocation fails (too big) and child process dies
Signed-off-by: Wesley W. Terpstra <terpstra@debian.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
Diffstat (limited to 'linux-user/syscall_defs.h')
0 files changed, 0 insertions, 0 deletions
