summary refs log tree commit diff stats
path: root/results/scraper/launchpad/1891354
blob: 4f8c72b979249822348b9cb9a885cfb6d398da56 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
Heap-use-after-free in usb_packet_unmap

Hello,
Reproducer:

cat << EOF | ./i386-softmmu/qemu-system-i386 -device nec-usb-xhci \
-trace usb\* -device usb-audio -device usb-storage,drive=mydrive \
-drive id=mydrive,file=null-co://,size=2M,format=raw,if=none \
-nodefaults -nographic -qtest stdio
outl 0xcf8 0x80001010
outl 0xcfc 0xc0202
outl 0xcf8 0x80001004
outl 0xcfc 0x1c77695e
writel 0xc0040 0xffffd855
writeq 0xc2000 0xff05140100000000
write 0x1d 0x1 0x27
write 0x2d 0x1 0x2e
write 0x17232 0x1 0x03
write 0x17254 0x1 0x05
write 0x17276 0x1 0x72
write 0x17278 0x1 0x02
write 0x3d 0x1 0x27
write 0x40 0x1 0x2e
write 0x41 0x1 0x72
write 0x42 0x1 0x01
write 0x4d 0x1 0x2e
write 0x4f 0x1 0x01
write 0x2007c 0x1 0xc7
writeq 0xc2000 0x5c05140100000000
write 0x20070 0x1 0x80
write 0x20078 0x1 0x08
write 0x2007c 0x1 0xfe
write 0x2007d 0x1 0x08
write 0x20081 0x1 0xff
write 0x20082 0x1 0x0b
write 0x20089 0x1 0x8c
write 0x2008d 0x1 0x04
write 0x2009d 0x1 0x10
writeq 0xc2000 0x2505ef019e092f00
EOF

20091==ERROR: AddressSanitizer: heap-use-after-free on address 0x611000045030 at pc 0x55db79edeef2 bp 0x7ffc4020b2b0 sp 0x7ffc4020b2a8
READ of size 4 at 0x611000045030 thread T0
    #0 0x55db79edeef1 in usb_packet_unmap hw/usb/libhw.c:64:28
    #1 0x55db79ede66f in usb_packet_map hw/usb/libhw.c:54:5
    #2 0x55db79f6d5f1 in xhci_setup_packet hw/usb/hcd-xhci.c:1618:5
    #3 0x55db79f67143 in xhci_fire_ctl_transfer hw/usb/hcd-xhci.c:1722:9
    #4 0x55db79f67143 in xhci_kick_epctx hw/usb/hcd-xhci.c:1991:13
    #5 0x55db79f8837d in xhci_doorbell_write hw/usb/hcd-xhci.c:3162:13
    #6 0x55db792c6b8e in memory_region_write_accessor softmmu/memory.c:483:5
    #7 0x55db792c658b in access_with_adjusted_size softmmu/memory.c:544:18
    #8 0x55db792c5d9b in memory_region_dispatch_write softmmu/memory.c
    #9 0x55db78d094d2 in flatview_write_continue exec.c:3176:23
    #10 0x55db78cfee6b in flatview_write exec.c:3216:14
    #11 0x55db78cfee6b in address_space_write exec.c:3308:18
    #12 0x55db793072a9 in qtest_process_command softmmu/qtest.c:452:13
    #13 0x55db79304087 in qtest_process_inbuf softmmu/qtest.c:710:9
    #14 0x55db7a7d7293 in fd_chr_read chardev/char-fd.c:68:9
    #15 0x7fc5d7f1a897 in g_main_context_dispatch
    #16 0x55db7aa571b3 in glib_pollfds_poll util/main-loop.c:217:9
    #17 0x55db7aa571b3 in os_host_main_loop_wait util/main-loop.c:240:5
    #18 0x55db7aa571b3 in main_loop_wait util/main-loop.c:516:11
    #19 0x55db79315008 in qemu_main_loop softmmu/vl.c:1676:9
    #20 0x55db7a8860fd in main softmmu/main.c:49:5

0x611000045030 is located 48 bytes inside of 256-byte region [0x611000045000,0x611000045100)
freed by thread T0 here:
    #0 0x55db78cac16d in free (build/i386-softmmu/qemu-system-i386+0x250e16d)
    #1 0x55db79f7c0e8 in xhci_ep_nuke_xfers hw/usb/hcd-xhci.c:1252:9
    #2 0x55db79f7b454 in xhci_disable_ep hw/usb/hcd-xhci.c:1279:5
    #3 0x55db79f79af7 in xhci_disable_slot hw/usb/hcd-xhci.c:2048:13
    #4 0x55db79f5aea3 in xhci_reset hw/usb/hcd-xhci.c:2706:9
    #5 0x55db79f82f49 in xhci_oper_write hw/usb/hcd-xhci.c:2966:13
    #6 0x55db792c6b8e in memory_region_write_accessor softmmu/memory.c:483:5
    #7 0x55db792c658b in access_with_adjusted_size softmmu/memory.c:544:18
    #8 0x55db792c5d9b in memory_region_dispatch_write softmmu/memory.c
    #9 0x55db78d094d2 in flatview_write_continue exec.c:3176:23
    #10 0x55db78cfee6b in flatview_write exec.c:3216:14
    #11 0x55db78cfee6b in address_space_write exec.c:3308:18
    #12 0x55db78d01fe7 in address_space_unmap exec.c:3634:9
    #13 0x55db79edebbb in dma_memory_unmap include/sysemu/dma.h:145:5
    #14 0x55db79edebbb in usb_packet_unmap hw/usb/libhw.c:65:9
    #15 0x55db79ede66f in usb_packet_map hw/usb/libhw.c:54:5
    #16 0x55db79f6d5f1 in xhci_setup_packet hw/usb/hcd-xhci.c:1618:5
    #17 0x55db79f67143 in xhci_fire_ctl_transfer hw/usb/hcd-xhci.c:1722:9
    #18 0x55db79f67143 in xhci_kick_epctx hw/usb/hcd-xhci.c:1991:13
    #19 0x55db79f8837d in xhci_doorbell_write hw/usb/hcd-xhci.c:3162:13
    #20 0x55db792c6b8e in memory_region_write_accessor softmmu/memory.c:483:5
    #21 0x55db792c658b in access_with_adjusted_size softmmu/memory.c:544:18
    #22 0x55db792c5d9b in memory_region_dispatch_write softmmu/memory.c
    #23 0x55db78d094d2 in flatview_write_continue exec.c:3176:23
    #24 0x55db78cfee6b in flatview_write exec.c:3216:14
    #25 0x55db78cfee6b in address_space_write exec.c:3308:18
    #26 0x55db793072a9 in qtest_process_command softmmu/qtest.c:452:13
    #27 0x55db79304087 in qtest_process_inbuf softmmu/qtest.c:710:9
    #28 0x55db7a7d7293 in fd_chr_read chardev/char-fd.c:68:9
    #29 0x7fc5d7f1a897 in g_main_context_dispatch

previously allocated by thread T0 here:
    #0 0x55db78cac562 in calloc (build/i386-softmmu/qemu-system-i386+0x250e562)
    #1 0x7fc5d7f20548 in g_malloc0 (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x54548)
    #2 0x55db79f8837d in xhci_doorbell_write hw/usb/hcd-xhci.c:3162:13
    #3 0x55db792c6b8e in memory_region_write_accessor softmmu/memory.c:483:5
    #4 0x55db792c658b in access_with_adjusted_size softmmu/memory.c:544:18
    #5 0x55db792c5d9b in memory_region_dispatch_write softmmu/memory.c
    #6 0x55db78d094d2 in flatview_write_continue exec.c:3176:23
    #7 0x55db78cfee6b in flatview_write exec.c:3216:14
    #8 0x55db78cfee6b in address_space_write exec.c:3308:18
    #9 0x55db793072a9 in qtest_process_command softmmu/qtest.c:452:13
    #10 0x55db79304087 in qtest_process_inbuf softmmu/qtest.c:710:9
    #11 0x55db7a7d7293 in fd_chr_read chardev/char-fd.c:68:9
    #12 0x7fc5d7f1a897 in g_main_context_dispatch

-Alex

On 200813 0024, Li Qiang wrote:
> Alexander Bulekov <email address hidden> 于2020年8月13日周四 上午12:21写道:
> >
> > Public bug reported:
> >
> > Hello,
> > Reproducer:
> >
> > cat << EOF | ./i386-softmmu/qemu-system-i386 -device nec-usb-xhci \
> > -trace usb\* -device usb-audio -device usb-storage,drive=mydrive \
> > -drive id=mydrive,file=null-co://,size=2M,format=raw,if=none \
> > -nodefaults -nographic -qtest stdio
> > outl 0xcf8 0x80001010
> > outl 0xcfc 0xc0202
> > outl 0xcf8 0x80001004
> > outl 0xcfc 0x1c77695e
> > writel 0xc0040 0xffffd855
> > writeq 0xc2000 0xff05140100000000
> > write 0x1d 0x1 0x27
> > write 0x2d 0x1 0x2e
> > write 0x17232 0x1 0x03
> > write 0x17254 0x1 0x05
> > write 0x17276 0x1 0x72
> > write 0x17278 0x1 0x02
> > write 0x3d 0x1 0x27
> > write 0x40 0x1 0x2e
> > write 0x41 0x1 0x72
> > write 0x42 0x1 0x01
> > write 0x4d 0x1 0x2e
> > write 0x4f 0x1 0x01
> > write 0x2007c 0x1 0xc7
> > writeq 0xc2000 0x5c05140100000000
> > write 0x20070 0x1 0x80
> > write 0x20078 0x1 0x08
> > write 0x2007c 0x1 0xfe
> > write 0x2007d 0x1 0x08
> > write 0x20081 0x1 0xff
> > write 0x20082 0x1 0x0b
> > write 0x20089 0x1 0x8c
> > write 0x2008d 0x1 0x04
> > write 0x2009d 0x1 0x10
> > writeq 0xc2000 0x2505ef019e092f00
> > EOF
> >
> > 20091==ERROR: AddressSanitizer: heap-use-after-free on address 0x611000045030 at pc 0x55db79edeef2 bp 0x7ffc4020b2b0 sp 0x7ffc4020b2a8
> > READ of size 4 at 0x611000045030 thread T0
> >     #0 0x55db79edeef1 in usb_packet_unmap hw/usb/libhw.c:64:28
> >     #1 0x55db79ede66f in usb_packet_map hw/usb/libhw.c:54:5
> >     #2 0x55db79f6d5f1 in xhci_setup_packet hw/usb/hcd-xhci.c:1618:5
> >     #3 0x55db79f67143 in xhci_fire_ctl_transfer hw/usb/hcd-xhci.c:1722:9
> >     #4 0x55db79f67143 in xhci_kick_epctx hw/usb/hcd-xhci.c:1991:13
> >     #5 0x55db79f8837d in xhci_doorbell_write hw/usb/hcd-xhci.c:3162:13
> >     #6 0x55db792c6b8e in memory_region_write_accessor softmmu/memory.c:483:5
> >     #7 0x55db792c658b in access_with_adjusted_size softmmu/memory.c:544:18
> >     #8 0x55db792c5d9b in memory_region_dispatch_write softmmu/memory.c
> >     #9 0x55db78d094d2 in flatview_write_continue exec.c:3176:23
> >     #10 0x55db78cfee6b in flatview_write exec.c:3216:14
> >     #11 0x55db78cfee6b in address_space_write exec.c:3308:18
> >     #12 0x55db793072a9 in qtest_process_command softmmu/qtest.c:452:13
> >     #13 0x55db79304087 in qtest_process_inbuf softmmu/qtest.c:710:9
> >     #14 0x55db7a7d7293 in fd_chr_read chardev/char-fd.c:68:9
> >     #15 0x7fc5d7f1a897 in g_main_context_dispatch
> >     #16 0x55db7aa571b3 in glib_pollfds_poll util/main-loop.c:217:9
> >     #17 0x55db7aa571b3 in os_host_main_loop_wait util/main-loop.c:240:5
> >     #18 0x55db7aa571b3 in main_loop_wait util/main-loop.c:516:11
> >     #19 0x55db79315008 in qemu_main_loop softmmu/vl.c:1676:9
> >     #20 0x55db7a8860fd in main softmmu/main.c:49:5
> >
> > 0x611000045030 is located 48 bytes inside of 256-byte region [0x611000045000,0x611000045100)
> > freed by thread T0 here:
> >     #0 0x55db78cac16d in free (build/i386-softmmu/qemu-system-i386+0x250e16d)
> >     #1 0x55db79f7c0e8 in xhci_ep_nuke_xfers hw/usb/hcd-xhci.c:1252:9
> >     #2 0x55db79f7b454 in xhci_disable_ep hw/usb/hcd-xhci.c:1279:5
> >     #3 0x55db79f79af7 in xhci_disable_slot hw/usb/hcd-xhci.c:2048:13
> >     #4 0x55db79f5aea3 in xhci_reset hw/usb/hcd-xhci.c:2706:9
> >     #5 0x55db79f82f49 in xhci_oper_write hw/usb/hcd-xhci.c:2966:13
> >     #6 0x55db792c6b8e in memory_region_write_accessor softmmu/memory.c:483:5
> >     #7 0x55db792c658b in access_with_adjusted_size softmmu/memory.c:544:18
> >     #8 0x55db792c5d9b in memory_region_dispatch_write softmmu/memory.c
> >     #9 0x55db78d094d2 in flatview_write_continue exec.c:3176:23
> >     #10 0x55db78cfee6b in flatview_write exec.c:3216:14
> >     #11 0x55db78cfee6b in address_space_write exec.c:3308:18
> >     #12 0x55db78d01fe7 in address_space_unmap exec.c:3634:9
> >     #13 0x55db79edebbb in dma_memory_unmap include/sysemu/dma.h:145:5
> >     #14 0x55db79edebbb in usb_packet_unmap hw/usb/libhw.c:65:9
> >     #15 0x55db79ede66f in usb_packet_map hw/usb/libhw.c:54:5
> >     #16 0x55db79f6d5f1 in xhci_setup_packet hw/usb/hcd-xhci.c:1618:5
> >     #17 0x55db79f67143 in xhci_fire_ctl_transfer hw/usb/hcd-xhci.c:1722:9
> >     #18 0x55db79f67143 in xhci_kick_epctx hw/usb/hcd-xhci.c:1991:13
> >     #19 0x55db79f8837d in xhci_doorbell_write hw/usb/hcd-xhci.c:3162:13
> >     #20 0x55db792c6b8e in memory_region_write_accessor softmmu/memory.c:483:5
> >     #21 0x55db792c658b in access_with_adjusted_size softmmu/memory.c:544:18
> >     #22 0x55db792c5d9b in memory_region_dispatch_write softmmu/memory.c
> >     #23 0x55db78d094d2 in flatview_write_continue exec.c:3176:23
> >     #24 0x55db78cfee6b in flatview_write exec.c:3216:14
> >     #25 0x55db78cfee6b in address_space_write exec.c:3308:18
> >     #26 0x55db793072a9 in qtest_process_command softmmu/qtest.c:452:13
> >     #27 0x55db79304087 in qtest_process_inbuf softmmu/qtest.c:710:9
> >     #28 0x55db7a7d7293 in fd_chr_read chardev/char-fd.c:68:9
> >     #29 0x7fc5d7f1a897 in g_main_context_dispatch
> >
> 
> This issue as far as I can see, is the DMA to MMIO issue.

Another one - Interesting...
So it joins these:
https://bugs.launchpad.net/qemu/+bug/1888606
https://bugs.launchpad.net/qemu/+bug/1886362

Could this one be dealt with by moving xhci_reset into a BH?
-Alex

> Thanks,
> Li Qiang
> 
> 
> > previously allocated by thread T0 here:
> >     #0 0x55db78cac562 in calloc (build/i386-softmmu/qemu-system-i386+0x250e562)
> >     #1 0x7fc5d7f20548 in g_malloc0 (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x54548)
> >     #2 0x55db79f8837d in xhci_doorbell_write hw/usb/hcd-xhci.c:3162:13
> >     #3 0x55db792c6b8e in memory_region_write_accessor softmmu/memory.c:483:5
> >     #4 0x55db792c658b in access_with_adjusted_size softmmu/memory.c:544:18
> >     #5 0x55db792c5d9b in memory_region_dispatch_write softmmu/memory.c
> >     #6 0x55db78d094d2 in flatview_write_continue exec.c:3176:23
> >     #7 0x55db78cfee6b in flatview_write exec.c:3216:14
> >     #8 0x55db78cfee6b in address_space_write exec.c:3308:18
> >     #9 0x55db793072a9 in qtest_process_command softmmu/qtest.c:452:13
> >     #10 0x55db79304087 in qtest_process_inbuf softmmu/qtest.c:710:9
> >     #11 0x55db7a7d7293 in fd_chr_read chardev/char-fd.c:68:9
> >     #12 0x7fc5d7f1a897 in g_main_context_dispatch
> >
> > -Alex
> >
> > ** Affects: qemu
> >      Importance: Undecided
> >          Status: New
> >
> > --
> > You received this bug notification because you are a member of qemu-
> > devel-ml, which is subscribed to QEMU.
> > https://bugs.launchpad.net/bugs/1891354
> >
> > Title:
> >   Heap-use-after-free in usb_packet_unmap
> >
> > Status in QEMU:
> >   New
> >
> > Bug description:
> >   Hello,
> >   Reproducer:
> >
> >   cat << EOF | ./i386-softmmu/qemu-system-i386 -device nec-usb-xhci \
> >   -trace usb\* -device usb-audio -device usb-storage,drive=mydrive \
> >   -drive id=mydrive,file=null-co://,size=2M,format=raw,if=none \
> >   -nodefaults -nographic -qtest stdio
> >   outl 0xcf8 0x80001010
> >   outl 0xcfc 0xc0202
> >   outl 0xcf8 0x80001004
> >   outl 0xcfc 0x1c77695e
> >   writel 0xc0040 0xffffd855
> >   writeq 0xc2000 0xff05140100000000
> >   write 0x1d 0x1 0x27
> >   write 0x2d 0x1 0x2e
> >   write 0x17232 0x1 0x03
> >   write 0x17254 0x1 0x05
> >   write 0x17276 0x1 0x72
> >   write 0x17278 0x1 0x02
> >   write 0x3d 0x1 0x27
> >   write 0x40 0x1 0x2e
> >   write 0x41 0x1 0x72
> >   write 0x42 0x1 0x01
> >   write 0x4d 0x1 0x2e
> >   write 0x4f 0x1 0x01
> >   write 0x2007c 0x1 0xc7
> >   writeq 0xc2000 0x5c05140100000000
> >   write 0x20070 0x1 0x80
> >   write 0x20078 0x1 0x08
> >   write 0x2007c 0x1 0xfe
> >   write 0x2007d 0x1 0x08
> >   write 0x20081 0x1 0xff
> >   write 0x20082 0x1 0x0b
> >   write 0x20089 0x1 0x8c
> >   write 0x2008d 0x1 0x04
> >   write 0x2009d 0x1 0x10
> >   writeq 0xc2000 0x2505ef019e092f00
> >   EOF
> >
> >   20091==ERROR: AddressSanitizer: heap-use-after-free on address 0x611000045030 at pc 0x55db79edeef2 bp 0x7ffc4020b2b0 sp 0x7ffc4020b2a8
> >   READ of size 4 at 0x611000045030 thread T0
> >       #0 0x55db79edeef1 in usb_packet_unmap hw/usb/libhw.c:64:28
> >       #1 0x55db79ede66f in usb_packet_map hw/usb/libhw.c:54:5
> >       #2 0x55db79f6d5f1 in xhci_setup_packet hw/usb/hcd-xhci.c:1618:5
> >       #3 0x55db79f67143 in xhci_fire_ctl_transfer hw/usb/hcd-xhci.c:1722:9
> >       #4 0x55db79f67143 in xhci_kick_epctx hw/usb/hcd-xhci.c:1991:13
> >       #5 0x55db79f8837d in xhci_doorbell_write hw/usb/hcd-xhci.c:3162:13
> >       #6 0x55db792c6b8e in memory_region_write_accessor softmmu/memory.c:483:5
> >       #7 0x55db792c658b in access_with_adjusted_size softmmu/memory.c:544:18
> >       #8 0x55db792c5d9b in memory_region_dispatch_write softmmu/memory.c
> >       #9 0x55db78d094d2 in flatview_write_continue exec.c:3176:23
> >       #10 0x55db78cfee6b in flatview_write exec.c:3216:14
> >       #11 0x55db78cfee6b in address_space_write exec.c:3308:18
> >       #12 0x55db793072a9 in qtest_process_command softmmu/qtest.c:452:13
> >       #13 0x55db79304087 in qtest_process_inbuf softmmu/qtest.c:710:9
> >       #14 0x55db7a7d7293 in fd_chr_read chardev/char-fd.c:68:9
> >       #15 0x7fc5d7f1a897 in g_main_context_dispatch
> >       #16 0x55db7aa571b3 in glib_pollfds_poll util/main-loop.c:217:9
> >       #17 0x55db7aa571b3 in os_host_main_loop_wait util/main-loop.c:240:5
> >       #18 0x55db7aa571b3 in main_loop_wait util/main-loop.c:516:11
> >       #19 0x55db79315008 in qemu_main_loop softmmu/vl.c:1676:9
> >       #20 0x55db7a8860fd in main softmmu/main.c:49:5
> >
> >   0x611000045030 is located 48 bytes inside of 256-byte region [0x611000045000,0x611000045100)
> >   freed by thread T0 here:
> >       #0 0x55db78cac16d in free (build/i386-softmmu/qemu-system-i386+0x250e16d)
> >       #1 0x55db79f7c0e8 in xhci_ep_nuke_xfers hw/usb/hcd-xhci.c:1252:9
> >       #2 0x55db79f7b454 in xhci_disable_ep hw/usb/hcd-xhci.c:1279:5
> >       #3 0x55db79f79af7 in xhci_disable_slot hw/usb/hcd-xhci.c:2048:13
> >       #4 0x55db79f5aea3 in xhci_reset hw/usb/hcd-xhci.c:2706:9
> >       #5 0x55db79f82f49 in xhci_oper_write hw/usb/hcd-xhci.c:2966:13
> >       #6 0x55db792c6b8e in memory_region_write_accessor softmmu/memory.c:483:5
> >       #7 0x55db792c658b in access_with_adjusted_size softmmu/memory.c:544:18
> >       #8 0x55db792c5d9b in memory_region_dispatch_write softmmu/memory.c
> >       #9 0x55db78d094d2 in flatview_write_continue exec.c:3176:23
> >       #10 0x55db78cfee6b in flatview_write exec.c:3216:14
> >       #11 0x55db78cfee6b in address_space_write exec.c:3308:18
> >       #12 0x55db78d01fe7 in address_space_unmap exec.c:3634:9
> >       #13 0x55db79edebbb in dma_memory_unmap include/sysemu/dma.h:145:5
> >       #14 0x55db79edebbb in usb_packet_unmap hw/usb/libhw.c:65:9
> >       #15 0x55db79ede66f in usb_packet_map hw/usb/libhw.c:54:5
> >       #16 0x55db79f6d5f1 in xhci_setup_packet hw/usb/hcd-xhci.c:1618:5
> >       #17 0x55db79f67143 in xhci_fire_ctl_transfer hw/usb/hcd-xhci.c:1722:9
> >       #18 0x55db79f67143 in xhci_kick_epctx hw/usb/hcd-xhci.c:1991:13
> >       #19 0x55db79f8837d in xhci_doorbell_write hw/usb/hcd-xhci.c:3162:13
> >       #20 0x55db792c6b8e in memory_region_write_accessor softmmu/memory.c:483:5
> >       #21 0x55db792c658b in access_with_adjusted_size softmmu/memory.c:544:18
> >       #22 0x55db792c5d9b in memory_region_dispatch_write softmmu/memory.c
> >       #23 0x55db78d094d2 in flatview_write_continue exec.c:3176:23
> >       #24 0x55db78cfee6b in flatview_write exec.c:3216:14
> >       #25 0x55db78cfee6b in address_space_write exec.c:3308:18
> >       #26 0x55db793072a9 in qtest_process_command softmmu/qtest.c:452:13
> >       #27 0x55db79304087 in qtest_process_inbuf softmmu/qtest.c:710:9
> >       #28 0x55db7a7d7293 in fd_chr_read chardev/char-fd.c:68:9
> >       #29 0x7fc5d7f1a897 in g_main_context_dispatch
> >
> >   previously allocated by thread T0 here:
> >       #0 0x55db78cac562 in calloc (build/i386-softmmu/qemu-system-i386+0x250e562)
> >       #1 0x7fc5d7f20548 in g_malloc0 (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x54548)
> >       #2 0x55db79f8837d in xhci_doorbell_write hw/usb/hcd-xhci.c:3162:13
> >       #3 0x55db792c6b8e in memory_region_write_accessor softmmu/memory.c:483:5
> >       #4 0x55db792c658b in access_with_adjusted_size softmmu/memory.c:544:18
> >       #5 0x55db792c5d9b in memory_region_dispatch_write softmmu/memory.c
> >       #6 0x55db78d094d2 in flatview_write_continue exec.c:3176:23
> >       #7 0x55db78cfee6b in flatview_write exec.c:3216:14
> >       #8 0x55db78cfee6b in address_space_write exec.c:3308:18
> >       #9 0x55db793072a9 in qtest_process_command softmmu/qtest.c:452:13
> >       #10 0x55db79304087 in qtest_process_inbuf softmmu/qtest.c:710:9
> >       #11 0x55db7a7d7293 in fd_chr_read chardev/char-fd.c:68:9
> >       #12 0x7fc5d7f1a897 in g_main_context_dispatch
> >
> >   -Alex
> >
> > To manage notifications about this bug go to:
> > https://bugs.launchpad.net/qemu/+bug/1891354/+subscriptions
> >
> 


Still reproduces with current version of QEMU (if it has been built with Clang + asan enabled). Marking as "Confirmed"

I moved this report over to QEMU's new bug tracker on gitlab.com.
Please continue with the discussion here:

https://gitlab.com/qemu-project/qemu/-/issues/540

Thanks for moving it over! ... let's close this one here on Launchpad now.