Segfault in artist vram_bit_write

Bug #1890370 reported by Alexander Bulekov on 2020-08-05
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Helge Deller

Bug Description


cat << EOF | ./hppa-softmmu/qemu-system-hppa -m 64 -display none \
-qtest stdio -accel qtest
writeq 0xf810049f 0xffffffffffffffff
writew 0xf8118001 0xff7c
writew 0xf8118000 0x8300
writeq 0xf81005fb 0x5c18006400189e

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /hw/display/artist.c:402:17 in
==23157==ERROR: AddressSanitizer: SEGV on unknown address 0x7f17563fffff (pc 0x560ce3ad742c bp 0x7ffe310c62e0 sp 0x7ffe310c5a60 T0)
==23157==The signal is caused by a WRITE memory access.
    #0 0x560ce3ad742c in vram_bit_write /hw/display/artist.c:402:43
    #1 0x560ce3acf2ab in artist_reg_write /hw/display/artist.c:892:9
    #2 0x560ce31c37a3 in memory_region_write_accessor /softmmu/memory.c:483:5
    #3 0x560ce31c2adc in access_with_adjusted_size /softmmu/memory.c:539:18
    #4 0x560ce31c0873 in memory_region_dispatch_write /softmmu/memory.c:1466:16
    #5 0x560ce286e056 in flatview_write_continue /exec.c:3176:23
    #6 0x560ce2856866 in flatview_write /exec.c:3216:14
    #7 0x560ce2856387 in address_space_write /exec.c:3308:18
    #8 0x560ce326a604 in qtest_process_command /softmmu/qtest.c:452:13
    #9 0x560ce3261c08 in qtest_process_inbuf /softmmu/qtest.c:710:9
    #10 0x560ce3260895 in qtest_read /softmmu/qtest.c:722:5
    #11 0x560ce571d343 in qemu_chr_be_write_impl /chardev/char.c:188:9
    #12 0x560ce571d4c7 in qemu_chr_be_write /chardev/char.c:200:9
    #13 0x560ce57317b3 in fd_chr_read /chardev/char-fd.c:68:9
    #14 0x560ce5885b74 in qio_channel_fd_source_dispatch /io/channel-watch.c:84:12
    #15 0x7f1665259897 in g_main_context_dispatch (/usr/lib/x86_64-linux-gnu/
    #16 0x560ce5c7da7b in glib_pollfds_poll /util/main-loop.c:217:9
    #17 0x560ce5c7b1ab in os_host_main_loop_wait /util/main-loop.c:240:5
    #18 0x560ce5c7ab44 in main_loop_wait /util/main-loop.c:516:11
    #19 0x560ce3282d00 in qemu_main_loop /softmmu/vl.c:1676:9
    #20 0x560ce58bd961 in main /softmmu/main.c:49:5
    #21 0x7f1663ddfe0a in __libc_start_main /build/glibc-GwnBeO/glibc-2.30/csu/../csu/libc-start.c:308:16
    #22 0x560ce2761729 in _start (/home/alxndr/Development/qemu/general-fuzz/build/hppa-softmmu/qemu-system-hppa+0x22d4729)

With -trace artist\*

[I 1596601002.853158] OPENED
[R +0.047035] writeq 0xf810049f 0xffffffffffffffff
24590@1596601002.900238:artist_reg_write 1 0x10049f <- 0xff
24590@1596601002.900258:artist_reg_write 4 0x1004a0 VRAM_IDX <- 0xffffffff
24590@1596601002.900269:artist_reg_write 2 0x1004a4 <- 0xffff
24590@1596601002.900280:artist_reg_write 1 0x1004a6 <- 0xff
[S +0.047130] OK
[R +0.047159] writew 0xf8118001 0xff7c
24590@1596601002.900331:artist_reg_write 1 0x118001 CMAP_BM_ACCESS <- 0xff
24590@1596601002.900344:artist_reg_write 1 0x118002 CMAP_BM_ACCESS <- 0x7c
[S +0.047194] OK
[R +0.047213] writew 0xf8118000 0x8300
24590@1596601002.900383:artist_reg_write 2 0x118000 CMAP_BM_ACCESS <- 0x8300
[S +0.047231] OK
[R +0.047243] writeq 0xf81005fb 0x5c18006400189e
24590@1596601002.900410:artist_reg_write 1 0x1005fb <- 0x0
24590@1596601002.900418:artist_reg_write 4 0x1005fc <- 0x5c180064
24590@1596601002.900424:artist_reg_write 2 0x100600 VRAM_WRITE_INCR_X <- 0x18
/home/alxndr/Development/qemu/general-fuzz/hw/display/artist.c:402:17: runtime error: store to misaligned address 0x7fd01d3fffff for type 'uint32_t' (aka 'unsigned int'), which requires 4 byte alignment
0x7fd01d3fffff: note: pointer points here
<memory cannot be printed>
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/alxndr/Development/qemu/general-fuzz/hw/display/artist.c:402:17 in


Changed in qemu:
status: New → Invalid
Helge Deller (hdeller) on 2020-08-05
Changed in qemu:
assignee: nobody → Helge Deller (hdeller)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers