mirror of https://gitlab.com/qemu-project/qemu
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
In the decode_group9() function, if we don't recognise the insn as
one that we should handle, we leave the 'entry' pointer unaltered.
Because the X86OpEntry struct has a union for the gen and decode
pointers, this means that the top level code will call decode.e.gen()
which tries to use the decode function pointer (still set to
decode_group9) as a gen function pointer.
This is undefined behaviour, but seems to be mostly harmless in
practice (we call decode_group9() again with bogus arguments and it
does nothing). If you have CFI enabled then it will trip the CFI
check:
../target/i386/tcg/decode-new.c.inc:2862:9: runtime error: control flow integrity check for type 'void (struct DisasContext *, struct X86DecodedInsn *)' failed during indirect function call
Set *entry to UNKNOWN_OPCODE to provoke the #UD exception, as we do
in decode_group1A() and decode_group11() for similar situations.
Thanks to the bug reporter for the clear description and analysis of
the bug and the simple reproducer.
Cc: qemu-stable@nongnu.org
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3172
Fixes:
|
4 days ago | |
|---|---|---|
| .. | ||
| alpha | 2 weeks ago | |
| arm | 2 weeks ago | |
| avr | 2 weeks ago | |
| hexagon | 4 weeks ago | |
| hppa | 2 weeks ago | |
| i386 | 4 days ago | |
| loongarch | 2 weeks ago | |
| m68k | 2 weeks ago | |
| microblaze | 2 weeks ago | |
| mips | 2 weeks ago | |
| openrisc | 2 weeks ago | |
| ppc | 2 weeks ago | |
| riscv | 2 weeks ago | |
| rx | 2 weeks ago | |
| s390x | 2 weeks ago | |
| sh4 | 2 weeks ago | |
| sparc | 2 weeks ago | |
| tricore | 2 weeks ago | |
| xtensa | 2 weeks ago | |
| Kconfig | 1 year ago | |
| meson.build | 1 year ago | |