The Life and Incredible Adventures
of One QEMU Bug
(Which I Finally Fixed)
=========================
A thread [1/n]
That is not for trolling, that is for LOL.
So here I omit the names of QEMU maintainers that were involved in these adventures.
I will call them Mr1 and Mr2.
Have fun!
[2/n]
It was not very serious or critical like others. So you would not be very frustrated if you meet it on the way.
I will not speak about its father. Let me keep the intrigue till the end.
[3/n]
It only asserted that the size of successful DMA transfers handled in ide_dma_cb() should be multiple of 512 (the size of a sector).
... 4 years later...
[4/n]
I've found QEMU crashed. Wow, syzkaller learned how to destroy its own environment :-/
[5/n]
Yes, I'm doing responsible disclosure, folks :-)
Then the crawling fun began.
[6/n]
[Jun 26] me: hey, friendly ping!
[Jul 05] secteam: Please feel free to send the patch upstream
me: no problem, sent PoC and patch to the public ML
lists.nongnu.org/archive/html/q…
[7/n]
[Jul 16] Mr1: hey Mr2, it's for you!
Mr2: I'm aware of the patch. It's on the list to investigate today.
/* 10 days passed... Huh? */
[8/n]
[Jul 27] me: hum, okay... Feel free to add me to CC, I can review the patches and test them with fuzzing!
/* 3.5 months passed... */
[9/n]
It crashes qemu during syzkaller fuzzing.
Why don't you apply my commit and then do the refactoring later when you want?
[Nov 7] somebody in ML: do you want to rework the code yourself?
[10/n]
/* Grr. Challenge accepted! A week of development. */
[Nov 14] me: new patch fixing IDE
[Nov 21] Mr1: we have unit tests. First you improve them to cover all cases. Do according the IDE specification.
[11/n]
lists.nongnu.org/archive/html/q…
/* More work done. I developed a new IDE fix and a shiny unit-test that also found an extra DMA emulation bug */
[Dec 16] me: sent the patch series
[12/n]
me: okay, I'll do that...
lists.nongnu.org/archive/html/q…
/* More work done. Rrrrr! It must be finished! */
[13/n]
lists.nongnu.org/archive/html/q…
[Dec 24] Mr2: I've been out to lunch for a little while. I'll review these series before the end of the year.
[Dec 28] me: hello anybody?
/* Silence. Happy New Year! No review. LOL!!! */
[14/n]
Nice idea! Red Had likes CVEs!
So MITRE allocated CVE-2019-20175 for this issue (with a DISPUTED tag).
cve.mitre.org/cgi-bin/cvenam…
[15/n]
/* 5 days passed */
[Jan 7] Mr1: okay, it's fine now.
[Jan 8] me: thank you a lot! Let's wait for more reviews.
/* 2 weeks passed */
[16/n]
[Jan 22] Mr1: I asked Mr2. He promised to take a look very soon!
[Jan 23] Mr2: merged.
github.com/jnsnow/qemu/co…
WOW! Really?!!
[17/n]
He is cool!
I would not be able to become a QEMU contributor without his help :-)
[n+1/n]



