From: Thomas Huth <thuth@redhat.com>
To: Richard Henderson <richard.henderson@linaro.org>,
Jeuk Kim <jeuk20.kim@gmail.com>,
qemu-devel@nongnu.org, stefanha@redhat.com
Cc: fam@euphon.net, pbonzini@redhat.com, qemu-block@nongnu.org,
jeuk20.kim@samsung.com, j-young.choi@samsung.com,
zheyuma97@gmail.com
Subject: Re: [PULL 1/1] hw/ufs: Fix buffer overflow bug
Date: Tue, 30 Apr 2024 06:36:55 +0200 [thread overview]
Message-ID: <a9b11bf1-4c99-4d5b-a2a7-d91fae18d9b4@redhat.com> (raw)
In-Reply-To: <5f2036ba-8fa6-4c75-9ac1-b782638027f5@redhat.com>
On 30/04/2024 06.32, Thomas Huth wrote:
> On 30/04/2024 02.17, Richard Henderson wrote:
>> On 4/28/24 20:25, Jeuk Kim wrote:
>>> From: Jeuk Kim <jeuk20.kim@samsung.com>
>>>
>>> It fixes the buffer overflow vulnerability in the ufs device.
>>> The bug was detected by sanitizers.
>>>
>>> You can reproduce it by:
>>>
>>> cat << EOF |\
>>> qemu-system-x86_64 \
>>> -display none -machine accel=qtest -m 512M -M q35 -nodefaults -drive \
>>> file=null-co://,if=none,id=disk0 -device ufs,id=ufs_bus -device \
>>> ufs-lu,drive=disk0,bus=ufs_bus -qtest stdio
>>> outl 0xcf8 0x80000810
>>> outl 0xcfc 0xe0000000
>>> outl 0xcf8 0x80000804
>>> outw 0xcfc 0x06
>>> write 0xe0000058 0x1 0xa7
>>> write 0xa 0x1 0x50
>>> EOF
>>>
>>> Resolves: #2299
>>> Fixes: 329f16624499 ("hw/ufs: Support for Query Transfer Requests")
>>> Reported-by: Zheyu Ma <zheyuma97@gmail.com>
>>> Signed-off-by: Jeuk Kim <jeuk20.kim@samsung.com>
>>> ---
>>> hw/ufs/ufs.c | 8 ++++++++
>>> 1 file changed, 8 insertions(+)
>>
>> For some reason this appears to cause failures on s390x:
>>
>> https://gitlab.com/qemu-project/qemu/-/jobs/6740883283
>>
>> All of the timeouts are new with this patch alone applied,
>> and go away when reverted.
>>
>> I wasn't aware that these tests used ufs, but I have no
>> other explanation...
>
> I don't know for sure, but the test failure might instead be related to the
> problem that gets fixed by
> https://lore.kernel.org/qemu-devel/20240429075908.36302-1-thuth@redhat.com/
> ... I'm preparing a pull request for that fix right now, so maybe you could
> try this ufs pull request afterwards again to see whether the problem is fixed?
Hmm, thinking about it twice, it cannot be the reason: That bug affects
aarch64/arm only, and in above CI run, some other targets were failing. So
the problem must be something else, indeed.
Thomas
next prev parent reply other threads:[~2024-04-30 4:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-29 3:25 [PULL 0/1] ufs queue Jeuk Kim
2024-04-29 3:25 ` [PULL 1/1] hw/ufs: Fix buffer overflow bug Jeuk Kim
2024-04-29 11:14 ` Michael Tokarev
2024-04-30 0:17 ` Richard Henderson
2024-04-30 4:32 ` Thomas Huth
2024-04-30 4:36 ` Thomas Huth [this message]
2024-04-29 13:41 ` [PULL 0/1] ufs queue Stefan Hajnoczi
2024-04-29 14:02 ` Richard Henderson
2024-05-01 22:15 ` Richard Henderson
-- strict thread matches above, loose matches on Subject: below --
2024-04-29 13:43 [PULL 0/1] Block patches Stefan Hajnoczi
2024-04-29 13:43 ` [PULL 1/1] hw/ufs: Fix buffer overflow bug Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a9b11bf1-4c99-4d5b-a2a7-d91fae18d9b4@redhat.com \
--to=thuth@redhat.com \
--cc=fam@euphon.net \
--cc=j-young.choi@samsung.com \
--cc=jeuk20.kim@gmail.com \
--cc=jeuk20.kim@samsung.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=stefanha@redhat.com \
--cc=zheyuma97@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).