[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 08d986: console: Avoid segfault in screendump
From: |
GitHub |
Subject: |
[Qemu-commits] [qemu/qemu] 08d986: console: Avoid segfault in screendump |
Date: |
Fri, 18 May 2018 04:58:07 -0700 |
Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: 08d9864fa4e0c616e076ca8b225d39a7ecb189af
https://github.com/qemu/qemu/commit/08d9864fa4e0c616e076ca8b225d39a7ecb189af
Author: Michal Privoznik <address@hidden>
Date: 2018-05-18 (Fri, 18 May 2018)
Changed paths:
M ui/console.c
Log Message:
-----------
console: Avoid segfault in screendump
After f771c5440e04626f1 it is possible to select device and
head which to take screendump from. And even though we check if
provided head number falls within range, it may still happen that
the console has no surface yet leading to SIGSEGV:
qemu.git $ ./x86_64-softmmu/qemu-system-x86_64 \
-qmp stdio \
-device virtio-vga,id=video0,max_outputs=4
{"execute":"qmp_capabilities"}
{"execute":"screendump", "arguments":{"filename":"/tmp/screen.ppm",
"device":"video0", "head":1}}
Segmentation fault
#0 0x00005628249dda88 in ppm_save (filename=0x56282826cbc0 "/tmp/screen.ppm",
ds=0x0, errp=0x7fff52a6fae0) at ui/console.c:304
#1 0x00005628249ddd9b in qmp_screendump (filename=0x56282826cbc0
"/tmp/screen.ppm", has_device=true, device=0x5628276902d0 "video0",
has_head=true, head=1, errp=0x7fff52a6fae0) at ui/console.c:375
#2 0x00005628247740df in qmp_marshal_screendump (args=0x562828265e00,
ret=0x7fff52a6fb68, errp=0x7fff52a6fb60) at qapi/qapi-commands-ui.c:110
Here, @ds from frame #0 (or @surface from frame #1) is
dereferenced at the very beginning of ppm_save(). And because
it's NULL crash happens.
Signed-off-by: Michal Privoznik <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>
Commit: 68898bc82bcb0e697ed03c2405321033ba7feaf7
https://github.com/qemu/qemu/commit/68898bc82bcb0e697ed03c2405321033ba7feaf7
Author: Paolo Bonzini <address@hidden>
Date: 2018-05-18 (Fri, 18 May 2018)
Changed paths:
M hw/display/Makefile.objs
M ui/Makefile.objs
Log Message:
-----------
ui: add x_keymap.o to modules
x_keymap.o is common to the SDL and GTK+ modules, and it causes the
QEMU binary to link to the X11 libraries. Add it separately to the
modules to keep the main QEMU binary smaller.
Signed-off-by: Paolo Bonzini <address@hidden>
Message-id: address@hidden
[ kraxel: fix lm32 target build (milkymist-tmu2) ]
Signed-off-by: Gerd Hoffmann <address@hidden>
Commit: e8dcb8ae5121965ac8c89e6b277ac127e9d08452
https://github.com/qemu/qemu/commit/e8dcb8ae5121965ac8c89e6b277ac127e9d08452
Author: Peter Maydell <address@hidden>
Date: 2018-05-18 (Fri, 18 May 2018)
Changed paths:
M ui/sdl2-2d.c
Log Message:
-----------
sdl: Move use of surface pointer below check for whether it is NULL
In commit 2ab858c6c38ee1 we added a use of the 'surf' variable
in sdl2_2d_update() that was unfortunately placed above the
early-exit-if-NULL check. Move it to where it ought to be.
Fixes: Coverity CID 1390598
Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Message-id: address@hidden
Signed-off-by: Gerd Hoffmann <address@hidden>
Commit: 30d9081d646cbcb37341738d19e29bf350f3dd66
https://github.com/qemu/qemu/commit/30d9081d646cbcb37341738d19e29bf350f3dd66
Author: Peter Maydell <address@hidden>
Date: 2018-05-18 (Fri, 18 May 2018)
Changed paths:
M hw/display/Makefile.objs
M ui/Makefile.objs
M ui/console.c
M ui/sdl2-2d.c
Log Message:
-----------
Merge remote-tracking branch 'remotes/kraxel/tags/ui-20180518-pull-request'
into staging
ui: bugfixes, move x11 dependency to modules.
# gpg: Signature made Fri 18 May 2018 08:40:41 BST
# gpg: using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <address@hidden>"
# gpg: aka "Gerd Hoffmann <address@hidden>"
# gpg: aka "Gerd Hoffmann (private) <address@hidden>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138
* remotes/kraxel/tags/ui-20180518-pull-request:
sdl: Move use of surface pointer below check for whether it is NULL
ui: add x_keymap.o to modules
console: Avoid segfault in screendump
Signed-off-by: Peter Maydell <address@hidden>
Compare: https://github.com/qemu/qemu/compare/681299482681...30d9081d646c
**NOTE:** This service been marked for deprecation:
https://developer.github.com/changes/2018-04-25-github-services-deprecation/
Functionality will be removed from GitHub.com on January 31st, 2019.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [qemu/qemu] 08d986: console: Avoid segfault in screendump,
GitHub <=