x86_cpu_gdb_read_register segfaults when gdb requests registers

Bug #1869497 reported by Matt Wilbur
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Fix Released
Undecided
Matt Wilbur

Bug Description

When attempting to attach to the gdbstub, a segfault occurs.

I traced this down to a problem in a call to gdb_get_reg16 where the mem_buf was being treated like a uint8_t* instead of a GByteArray. The buffer passed to gdb_get_reg16 ends up passing an invalid GByteArray pointer, which subsequentlycauses a segfault in memcpy.

I have a fix for this - just need to educate myself on how to submit a patch.

Matt Wilbur (mattwilbur)
description: updated
Matt Wilbur (mattwilbur)
Changed in qemu:
assignee: nobody → Matt Wilbur (mattwilbur)
Revision history for this message
Peter Maydell (pmaydell) wrote :

Thanks for tracking down the source of the bug. Our 'submitting patches' policy is at https://wiki.qemu.org/Contribute/SubmitAPatch in case you haven't already found it. (It's quite long but for a simple one-shot bugfix patch the important stuff is just the summarized bits at the top.)

Revision history for this message
Philippe Mathieu-Daudé (philmd) wrote :

Fixed in commit bbc40fefcee0d69d61ceaf8c0695d2ce43cdc87b.

Changed in qemu:
status: New → Fix Committed
Thomas Huth (th-huth)
Changed in qemu:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.