Heap-buffer-overflow in sdhci_write_dataport
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Reproducer:
cat << EOF | ./qemu-
-machine raspi3b,accel=qtest -m 1G
write 0x3f30002c 0x1 0x25
write 0x3f300004 0x1 0x01
write 0x3f300006 0x1 0xc0
write 0x3f30000c 0x1 0x22
write 0x3f30000e 0x1 0x20
write 0x3f30000f 0x1 0x0
write 0x3f300000 0x1 0x48
write 0x3f300003 0x1 0x0
write 0x3f300005 0x1 0x14
write 0x3f300007 0x1 0x10
write 0x3f30000c 0x1 0x32
write 0x3f30000f 0x1 0x0
write 0x3f300001 0x1 0x00
write 0x3f300002 0x1 0x30
write 0x3f300003 0x1 0x3f
EOF
Stacktrace:
==654080==ERROR: AddressSanitizer: heap-buffer-
WRITE of size 1 at 0x619000017b80 thread T0
#0 0x562988348718 in sdhci_write_
#1 0x562988348718 in sdhci_write /home/alxndr/
#2 0x5629890591fe in memory_
#3 0x562989058bfb in access_
#4 0x562989058467 in memory_
#5 0x5629893e8ffb in flatview_
#6 0x5629893de71b in flatview_write /home/alxndr/
#7 0x5629893de71b in address_space_write /home/alxndr/
#8 0x562988334d9c in dma_memory_
#9 0x562988334d9c in dma_memory_rw /home/alxndr/
#10 0x562988334d9c in dma_memory_write /home/alxndr/
#11 0x562988334d9c in sdhci_sdma_
#12 0x56298834427f in sdhci_write /home/alxndr/
#13 0x5629890591fe in memory_
#14 0x562989058bfb in access_
#15 0x562989058467 in memory_
#16 0x5629893e8ffb in flatview_
#17 0x5629893de71b in flatview_write /home/alxndr/
#18 0x5629893de71b in address_space_write /home/alxndr/
#19 0x56298904ad35 in qtest_process_
#20 0x562989043b97 in qtest_process_inbuf /home/alxndr/
#21 0x562989894286 in fd_chr_read /home/alxndr/
#22 0x7f535645baae in g_main_
#23 0x562989eef363 in glib_pollfds_poll /home/alxndr/
#24 0x562989eef363 in os_host_
#25 0x562989eef363 in main_loop_wait /home/alxndr/
#26 0x562988faa599 in qemu_main_loop /home/alxndr/
#27 0x5629872371fd in main /home/alxndr/
#28 0x7f5355f00cc9 in __libc_start_main csu/../
#29 0x56298718abc9 in _start (/home/
0x619000017b80 is located 0 bytes to the right of 1024-byte region [0x619000017780
allocated by thread T0 here:
#0 0x562987204db2 in calloc (/home/
#1 0x7f5356461ae0 in g_malloc0 (/usr/lib/
#2 0x56298834a187 in sdhci_sysbus_
#3 0x56298987fe77 in device_set_realized /home/alxndr/
#4 0x5629898153b5 in property_set_bool /home/alxndr/
Can you still reproduce this issue with the latest git version of QEMU? ... for me, it does not crash anymore.