]> git.proxmox.com Git - mirror_qemu.git/commit
linux-user: Sanitize interp_info and, for mips only, init field fp_abi
authorDaniel Santos <daniel.santos@pobox.com>
Sun, 19 May 2019 16:15:26 +0000 (18:15 +0200)
committerLaurent Vivier <laurent@vivier.eu>
Wed, 22 May 2019 18:50:55 +0000 (20:50 +0200)
commitabcac736c1505254ec3f9587aff04fbe4705a55e
tree99931bd3396f23f8d3e6dba440314cf9b09e8374
parent4bdcd79e3e4127c2813a4caebd38c96f1974983e
linux-user: Sanitize interp_info and, for mips only, init field fp_abi

Sanitize interp_info structure in load_elf_binary() and, for MIPS only,
init its field fp_abi to MIPS_ABI_FP_UNKNOWN. This fixes appearances of
"Unexpected FPU mode" message in some MIPS use cases. Currently, this
bug is a complete stopper for some MIPS binaries.

In load_elf_binary(), struct image_info interp_info is used without
being properly initialized. One result is that when the ELF's program
header doesn't contain an entry for the ABI flags, then the value of
the struct image_info's fp_abi field is set to whatever happened to
be in stack memory at the time.

Backporting to 4.0 and, if possible, to 3.1 is recommended.

Fixes: https://bugs.launchpad.net/qemu/+bug/1825002
Signed-off-by: Daniel Santos <daniel.santos@pobox.com>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <1558282527-22183-6-git-send-email-aleksandar.markovic@rt-rk.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
linux-user/elfload.c