Re: [PATCH 0/8] tests: Make expliction defaults for tests

2022-09-02 Thread Alexander Bulekov
On 220902 1851, Juan Quintela wrote: > Hi > > For a long, long time I have had local hacks on my tree to be able to > run "make tests" when I have a minimal configure guest. This is a > first try to upstream some of it. > > - by default we always setup -display none (it already was the > defau

Re: [PATCH-for-7.2 1/2] hw/sd/sdhci: Do not set Buf Wr Ena before writing block (CVE-2022-3872)

2022-11-08 Thread Alexander Bulekov
On 221107 2312, Philippe Mathieu-Daudé wrote: > When sdhci_write_block_to_card() is called to transfer data from > the FIFO to the SD bus, the data is already present in the buffer > and we have to consume it directly. > > See the description of the 'Buffer Write Enable' bit from the > 'Present St

Re: [PATCH-for-7.2 1/2] hw/sd/sdhci: Do not set Buf Wr Ena before writing block (CVE-2022-3872)

2022-11-08 Thread Alexander Bulekov
On 221108 1225, Alexander Bulekov wrote: > On 221107 2312, Philippe Mathieu-Daudé wrote: > > When sdhci_write_block_to_card() is called to transfer data from > > the FIFO to the SD bus, the data is already present in the buffer > > and we have to consume it directly. > &g

Re: [PULL 24/31] fuzz: support for fork-based fuzzing.

2020-02-27 Thread Alexander Bulekov
On 200224 1135, Stefan Hajnoczi wrote: > On Sat, Feb 22, 2020 at 05:34:29AM -0600, Eric Blake wrote: > > On 2/22/20 2:50 AM, Stefan Hajnoczi wrote: > > > From: Alexander Bulekov > > > > > > fork() is a simple way to ensure that state does not leak in betwe

Re: [PATCH 1/3] Use &error_abort instead of separate assert()

2020-03-13 Thread Alexander Bulekov
Object *) args); > > -qmp_marshal_qom_list_types(args, &response, &err); > -assert(!err); > +qmp_marshal_qom_list_types(args, &response, &error_abort); > lst = qobject_to(QList, response); > apply_to_qlist(lst, false); > qobject_unref(response); > -- > 2.21.1 > Thanks! Acked-by: Alexander Bulekov

Re: [PATCH v2 0/6] hw/sd/sdcard: Do not attempt to erase out of range addresses

2020-10-17 Thread Alexander Bulekov
sert if accessing an illegal group > > hw/sd/sd.c | 30 ++ > hw/sd/trace-events | 2 +- > 2 files changed, 23 insertions(+), 9 deletions(-) > > -- > 2.26.2 > Hi Phil, For this series: Tested-by: Alexander Bulekov Thanks -Alex

[PATCH] hw/scsi/megasas: Assert cdb_len is valid in megasas_handle_scsi()

2020-12-01 Thread Alexander Bulekov
; scsi_cdb_length(cdb) >= cdb_len' failed. tests/qtest/libqtest.c:181: kill_qemu() detected QEMU death from signal 6 (Aborted) (core dumped) ERROR qtest-x86_64/fuzz-test - too few tests run (expected 1, got 0) Signed-off-by: Alexander Bulekov Signed-off-by: Philippe Mathieu-Daudé

Re: [PATCH v2 8/9] hw/sd/sdcard: Update coding style to make checkpatch.pl happy

2020-07-13 Thread Alexander Bulekov
g> > --- Reviewed-by: Alexander Bulekov > hw/sd/sd.c | 24 > 1 file changed, 16 insertions(+), 8 deletions(-) > > diff --git a/hw/sd/sd.c b/hw/sd/sd.c > index 5ab945dade..0f048358ab 100644 > --- a/hw/sd/sd.c > +++ b/hw/sd/sd.c > @@ -1175,8 +1175,

Re: [PATCH] sd: sdhci: check data_count is within fifo_buffer

2020-08-30 Thread Alexander Bulekov
Here's a qtest reproducer for this one: cat << EOF |./i386-softmmu/qemu-system-i386 -nodefaults \ -device sdhci-pci -device sd-card,drive=mydrive \ -drive if=sd,index=0,file=null-co://,format=raw,id=mydrive \ -nographic -accel qtest -qtest stdio -nographic outl 0xcf8 0x80001001 outl 0xcfc 0x7e6f25

Re: [PATCH 0/4] hw/sd/sdhci: Strengthen multiple DMA transfers

2020-09-10 Thread Alexander Bulekov
I fuzzed the SDHCI with this applied. There are still bugs in SDHCI, but this fixes the ones triggered by my initial bug-reproducers, and doesn't appear to create any new bugs. In the interest of incrementally fixing the issues, for this series: Tested-by: Alexander Bulekov On 200903

Re: [PATCH v2 0/3] hw/sd/sdhci: Fix DMA Transfer Block Size field width

2020-09-10 Thread Alexander Bulekov
For this series: Tested-by: Alexander Bulekov On 200901 1604, Philippe Mathieu-Daudé wrote: > Fix the SDHCI issue reported last week by Alexander: > https://bugs.launchpad.net/qemu/+bug/1892960 > > The field is 12-bit (4KiB) but the guest can set > up to 16-bit (64KiB), leadin

Re: [PATCH] hw: ide: check the pointer before do dma memory unmap

2020-09-21 Thread Alexander Bulekov
with the NULL buffer. > This is the LP#1884693: > > -->https://bugs.launchpad.net/qemu/+bug/1884693 > > Reported-by: Alexander Bulekov > Signed-off-by: Li Qiang I'm not very familiar with the IDE code, but this seems like a simple null-ptr check, and Li has not received

Re: [PATCH-for-6.2 2/2] tests/qtest/fdc-test: Add a regression test for CVE-2021-3507

2021-11-23 Thread Alexander Bulekov
> 0x0c3280004590: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd > Shadow byte legend (one shadow byte represents 8 application bytes): > Addressable: 00 > Heap left redzone: fa > Freed heap region: fd > ==4028352==ABORTING > > Repor

Re: [PATCH-for-6.2 v3 2/2] tests/qtest/fdc-test: Add a regression test for CVE-2021-20196

2021-11-23 Thread Alexander Bulekov
On 211123 1449, Philippe Mathieu-Daudé wrote: > On 11/23/21 14:42, Hanna Reitz wrote: > > On 18.11.21 13:06, Philippe Mathieu-Daudé wrote: > >> From: Alexander Bulekov > >> > >> Without the previous commit, when running 'make check-qtest-i386' >

[PATCH v4 3/3] hw: replace most qemu_bh_new calls with qemu_bh_new_guarded

2023-01-18 Thread Alexander Bulekov
This protects devices from bh->mmio reentrancy issues. Signed-off-by: Alexander Bulekov --- hw/9pfs/xen-9p-backend.c| 4 +++- hw/block/dataplane/virtio-blk.c | 3 ++- hw/block/dataplane/xen-block.c | 5 +++-- hw/block/virtio-blk.c | 5 +++-- hw/char/virtio-serial-bu

[PATCH v4 2/3] async: Add an optional reentrancy guard to the BH API

2023-01-18 Thread Alexander Bulekov
Devices can pass their MemoryReentrancyGuard (from their DeviceState), when creating new BHes. Then, the async API will toggle the guard before/after calling the BH call-back. This prevents bh->mmio reentrancy issues. Signed-off-by: Alexander Bulekov --- docs/devel/multiple-iothreads.txt |

Re: [PATCH v4 2/3] async: Add an optional reentrancy guard to the BH API

2023-01-25 Thread Alexander Bulekov
On 230125 1624, Stefan Hajnoczi wrote: > On Thu, Jan 19, 2023 at 02:03:07AM -0500, Alexander Bulekov wrote: > > Devices can pass their MemoryReentrancyGuard (from their DeviceState), > > when creating new BHes. Then, the async API will toggle the guard > > before/after cal

[PATCH v5 4/4] hw: replace most qemu_bh_new calls with qemu_bh_new_guarded

2023-01-25 Thread Alexander Bulekov
This protects devices from bh->mmio reentrancy issues. Reviewed-by: Stefan Hajnoczi Signed-off-by: Alexander Bulekov --- hw/9pfs/xen-9p-backend.c| 4 +++- hw/block/dataplane/virtio-blk.c | 3 ++- hw/block/dataplane/xen-block.c | 5 +++-- hw/block/virtio-blk.c | 5 +++--

[PATCH v5 2/4] async: Add an optional reentrancy guard to the BH API

2023-01-25 Thread Alexander Bulekov
Devices can pass their MemoryReentrancyGuard (from their DeviceState), when creating new BHes. Then, the async API will toggle the guard before/after calling the BH call-back. This prevents bh->mmio reentrancy issues. Signed-off-by: Alexander Bulekov --- docs/devel/multiple-iothreads.txt |

[PATCH v6 2/4] async: Add an optional reentrancy guard to the BH API

2023-02-04 Thread Alexander Bulekov
Devices can pass their MemoryReentrancyGuard (from their DeviceState), when creating new BHes. Then, the async API will toggle the guard before/after calling the BH call-back. This prevents bh->mmio reentrancy issues. Reviewed-by: Darren Kenny Signed-off-by: Alexander Bulekov --- docs/de

[PATCH v6 4/4] hw: replace most qemu_bh_new calls with qemu_bh_new_guarded

2023-02-04 Thread Alexander Bulekov
This protects devices from bh->mmio reentrancy issues. Reviewed-by: Darren Kenny Reviewed-by: Stefan Hajnoczi Signed-off-by: Alexander Bulekov --- hw/9pfs/xen-9p-backend.c| 4 +++- hw/block/dataplane/virtio-blk.c | 3 ++- hw/block/dataplane/xen-block.c | 5 +++-- hw/char/vir

Re: [RFC PATCH 0/9] hw/sd: Allow card size not power of 2 again

2021-06-23 Thread Alexander Bulekov
On 210623 2000, Philippe Mathieu-Daudé wrote: > Hi Ubi-Wan Kenubi and Tom, > > In commit a9bcedd (SD card size has to be power of 2) we decided > to restrict SD card size to avoid security problems (CVE-2020-13253) > but this became not practical to some users. > > This RFC series tries to remove

Re: [RFC PATCH 0/9] hw/sd: Allow card size not power of 2 again

2021-06-25 Thread Alexander Bulekov
On 210624 1012, Philippe Mathieu-Daudé wrote: > On 6/24/21 4:50 AM, Alexander Bulekov wrote: > > On 210623 2000, Philippe Mathieu-Daudé wrote: > >> Hi Ubi-Wan Kenubi and Tom, > >> > >> In commit a9bcedd (SD card size has to be power of 2) we decided > >&g

Re: [PATCH 1/3] hw/sd: When card is in wrong state, log which state it is

2021-07-02 Thread Alexander Bulekov
Bin Meng > Message-Id: <20210624142209.1193073-2-f4...@amsat.org> Reviewed-by: Alexander Bulekov > --- > hw/sd/sd.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/hw/sd/sd.c b/hw/sd/sd.c > index 282d39a7042..d8fdf84f4db 100644 > --- a/hw/sd/s

Re: [PATCH 3/3] hw/sd: Check for valid address range in SEND_WRITE_PROT (CMD30)

2021-07-02 Thread Alexander Bulekov
2d ("hw/sd: fix out-of-bounds check > for multi block reads"), check the address range before sending > the status of the write protection bits. > > Include the qtest reproducer provided by Alexander Bulekov: > > $ make check-qtest-i386 > ... > Running test qte

Re: [PATCH-for-6.1 1/3] hw/sd/sdcard: Document out-of-range addresses for SEND_WRITE_PROT

2021-08-02 Thread Alexander Bulekov
the first addressed group. If the addresses of the last groups > are outside the valid range, then the corresponding write protection > bits shall be set to 0. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alexander Bulekov -Alex > --- > hw/sd/sd.c | 9 - >

Re: [PATCH-for-6.2 3/3] hw/sd/sdcard: Rename Write Protect Group variables

2021-08-02 Thread Alexander Bulekov
$ sed -i -e s/wp_groups/wp_group_bmap/ \ >-e s/wpgrps_size/wp_group_bits/ hw/sd/sd.c > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alexander Bulekov -Alex > --- > hw/sd/sd.c | 28 ++-- > 1 file changed, 14 insertions(+), 14 deletion

Re: [PATCH-for-6.1 v2 0/2] hw/sd/sdcard: Fix assertion accessing out-of-range addresses with CMD30

2021-08-03 Thread Alexander Bulekov
i-v3 -jobs=4 -workers=4 \ -focus_function=sd_wpbits \ ~/oss-fuzz/qemu_qemu-fuzz-i386-target-generic-fuzz-sdhci-v3/ Tested-by: Alexander Bulekov Thanks! > hw/sd/sd.c | 9 - > tests/qtest/fuzz-sdcard-test.c | 36 ++ &

Re: [PATCH] storage-daemon: Add missing build dependency to the vhost-user-blk-test

2021-08-11 Thread Alexander Bulekov
On 210811 1147, Thomas Huth wrote: > vhost-user-blk-test needs the qemu-storage-deamon, otherwise it > currently hangs. So make sure that we build the daemon before running > the tests. > > Signed-off-by: Thomas Huth > --- Tested-by: Alexander Bulekov

Re: [PATCH] tests/qtest/vhost-user-blk-test: Check whether qemu-storage-daemon is available

2021-08-11 Thread Alexander Bulekov
ible. > > Signed-off-by: Thomas Huth I manually removed ./storage-daemon/qemu-storage-daemon and re-ran qos-test. The test errored-out without hanging. Reviewed-by: Alexander Bulekov Tested-by: Alexander Bulekov

Re: [RFC PATCH 00/10] security: Introduce qemu_security_policy_taint() API

2021-09-09 Thread Alexander Bulekov
On 210909 0120, Philippe Mathieu-Daudé wrote: > Hi, > > This series is experimental! The goal is to better limit the > boundary of what code is considerated security critical, and > what is less critical (but still important!). > > This approach was quickly discussed few months ago with Markus >

[PATCH 1/2] floppy: add a regression test for CVE-2020-25741

2021-03-18 Thread Alexander Bulekov
0 outb 0x3f5 0x0 outb 0x3f5 0x01 outw 0x3f1 0x0500 outb 0x3f5 0x00 EOF Signed-off-by: Alexander Bulekov --- Might be useful for reproducing/regression testing tests/qtest/fuzz-test.c | 54 + 1 file changed, 54 insertions(+) diff --git a/tests/qtest/fuzz-te

[PATCH 2/2] floppy: add a regression test for CVE-2021-20196

2021-03-18 Thread Alexander Bulekov
0 outb 0x3f5 0x0 outb 0x3f5 0x01 outw 0x3f1 0x0500 outb 0x3f5 0x00 EOF Signed-off-by: Alexander Bulekov --- Since this looks very similar to CVE-2021-20196 (I believe Li pointed out that issue in this thread), I'm also posting the reproducer for that here. tests/qtest/fuzz-

Re: [PATCH 1/2] floppy: add a regression test for CVE-2020-25741

2021-03-19 Thread Alexander Bulekov
On 210319 1054, Markus Armbruster wrote: > Paolo Bonzini writes: > > > On 19/03/21 06:53, Markus Armbruster wrote: > >> I guess this is a reproducer. Please also describe actual and expected > >> result. Same for PATCH 2. > > > > Isn't it in the patch itself? > > A commit message should tell m

Re: [PATCH 1/2] floppy: add a regression test for CVE-2020-25741

2021-03-19 Thread Alexander Bulekov
On 210319 1026, Paolo Bonzini wrote: > On 19/03/21 06:53, Markus Armbruster wrote: > > I guess this is a reproducer. Please also describe actual and expected > > result. Same for PATCH 2. > > Isn't it in the patch itself? > > Alexander, I think these reproducers are self-contained enough (no wr

[PATCH v2] floppy: remove dead code related to formatting

2021-04-27 Thread Alexander Bulekov
b). Suggested-by: Hervé Poussineau Signed-off-by: Alexander Bulekov --- I ran through tests/qtest/fdc-test, and ran fdformat on a dummy disk - nothing exploded, but since I don't use floppies very often, more eyes definitely won't hurt. In particular, I'm not sure about the f

[PATCH v7 4/6] hw: replace most qemu_bh_new calls with qemu_bh_new_guarded

2023-03-13 Thread Alexander Bulekov
This protects devices from bh->mmio reentrancy issues. Thanks: Thomas Huth for diagnosing OS X test failure. Reviewed-by: Darren Kenny Reviewed-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Reviewed-by: Paul Durrant Signed-off-by: Alexander Bulekov --- hw/9pfs/xen-9p-backen

[PATCH v7 2/6] async: Add an optional reentrancy guard to the BH API

2023-03-13 Thread Alexander Bulekov
Devices can pass their MemoryReentrancyGuard (from their DeviceState), when creating new BHes. Then, the async API will toggle the guard before/after calling the BH call-back. This prevents bh->mmio reentrancy issues. Reviewed-by: Darren Kenny Signed-off-by: Alexander Bulekov --- docs/de

[PATCH v8 2/8] async: Add an optional reentrancy guard to the BH API

2023-04-21 Thread Alexander Bulekov
Devices can pass their MemoryReentrancyGuard (from their DeviceState), when creating new BHes. Then, the async API will toggle the guard before/after calling the BH call-back. This prevents bh->mmio reentrancy issues. Reviewed-by: Darren Kenny Signed-off-by: Alexander Bulekov --- docs/de

[PATCH v8 4/8] hw: replace most qemu_bh_new calls with qemu_bh_new_guarded

2023-04-21 Thread Alexander Bulekov
This protects devices from bh->mmio reentrancy issues. Thanks: Thomas Huth for diagnosing OS X test failure. Reviewed-by: Darren Kenny Reviewed-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Reviewed-by: Paul Durrant Signed-off-by: Alexander Bulekov Reviewed-by: Thomas Huth ---

[PATCH v8 8/8] memory: abort on re-entrancy in debug builds

2023-04-21 Thread Alexander Bulekov
This is useful for using unit-tests/fuzzing to detect bugs introduced by the re-entrancy guard mechanism into devices that are intentionally re-entrant. Signed-off-by: Alexander Bulekov --- softmmu/memory.c | 3 +++ util/async.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a

[PATCH v9 7/8] memory: abort on re-entrancy in debug builds

2023-04-26 Thread Alexander Bulekov
This is useful for using unit-tests/fuzzing to detect bugs introduced by the re-entrancy guard mechanism into devices that are intentionally re-entrant. Signed-off-by: Alexander Bulekov Reviewed-by: Thomas Huth --- softmmu/memory.c | 3 +++ util/async.c | 3 +++ 2 files changed, 6

[PATCH v9 2/8] async: Add an optional reentrancy guard to the BH API

2023-04-26 Thread Alexander Bulekov
Devices can pass their MemoryReentrancyGuard (from their DeviceState), when creating new BHes. Then, the async API will toggle the guard before/after calling the BH call-back. This prevents bh->mmio reentrancy issues. Reviewed-by: Darren Kenny Signed-off-by: Alexander Bulekov --- docs/de

[PATCH v9 4/8] hw: replace most qemu_bh_new calls with qemu_bh_new_guarded

2023-04-26 Thread Alexander Bulekov
This protects devices from bh->mmio reentrancy issues. Thanks: Thomas Huth for diagnosing OS X test failure. Reviewed-by: Darren Kenny Reviewed-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Reviewed-by: Paul Durrant Signed-off-by: Alexander Bulekov Reviewed-by: Thomas Huth ---

Re: [PATCH v9 7/8] memory: abort on re-entrancy in debug builds

2023-04-27 Thread Alexander Bulekov
On 230426 1219, Alexander Bulekov wrote: > This is useful for using unit-tests/fuzzing to detect bugs introduced by > the re-entrancy guard mechanism into devices that are intentionally > re-entrant. > > Signed-off-by: Alexander Bulekov > Reviewed-by: Thomas Huth > --- Thi

[PATCH v10 4/8] hw: replace most qemu_bh_new calls with qemu_bh_new_guarded

2023-04-27 Thread Alexander Bulekov
This protects devices from bh->mmio reentrancy issues. Thanks: Thomas Huth for diagnosing OS X test failure. Reviewed-by: Darren Kenny Reviewed-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Reviewed-by: Paul Durrant Signed-off-by: Alexander Bulekov Reviewed-by: Thomas Huth ---

[PATCH v10 2/8] async: Add an optional reentrancy guard to the BH API

2023-04-27 Thread Alexander Bulekov
Devices can pass their MemoryReentrancyGuard (from their DeviceState), when creating new BHes. Then, the async API will toggle the guard before/after calling the BH call-back. This prevents bh->mmio reentrancy issues. Reviewed-by: Darren Kenny Signed-off-by: Alexander Bulekov --- docs/de

[PATCH] async: avoid use-after-free on re-entrancy guard

2023-05-01 Thread Alexander Bulekov
ned-off-by: Alexander Bulekov --- util/async.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/util/async.c b/util/async.c index 9df7674b4e..055070ffbd 100644 --- a/util/async.c +++ b/util/async.c @@ -156,18 +156,20 @@ void aio_bh_call(QEMUBH *bh) {

[PATCH] floppy: remove unused function fdctrl_format_sector

2021-01-08 Thread Alexander Bulekov
T flag is set (in fdctrl_handle_format_track) is closely followed by the same flag being unset, with no possibility to call fdctrl_format_sector in between. This removes fdctrl_format_sector and the unncessary setting/unsetting of the FD_STATE_FORMAT flag. Signed-off-by: Alexander Bulekov --- hw

Re: [PATCH] hw/scsi/megasas: check for NULL frame in megasas_command_cancelled()

2021-01-12 Thread Alexander Bulekov
Looks like one reported by OSS-Fuzz: Here's a reproducer cat << EOF | ./qemu-system-i386 -qtest stdio -display none \ -machine q35,accel=qtest -m 512M -nodefaults \ -device megasas -device scsi-cd,drive=null0 \ -blockdev driver=null-co,read-zeroes=on,node-name=null0 outl 0xcf8 0x8801 outl 0x

Re: [PATCH 3/4] tests/qtest: Only run fuzz-megasas-test if megasas device is available

2021-01-15 Thread Alexander Bulekov
On 210115 1609, Philippe Mathieu-Daudé wrote: > This test fails when QEMU is built without the megasas device, > restrict it to its availability. Should we just make a separate directory for fuzzer tests and have a separate source file for each reproducer (or for each device)? That way, we avoid c

[PATCH] hw/ide/ahci: map cmd_fis as DMA_DIRECTION_TO_DEVICE

2021-01-19 Thread Alexander Bulekov
cmd_fis is mapped as DMA_DIRECTION_FROM_DEVICE, however, it is read from, and not written to anywhere. Fix the DMA_DIRECTION and mark cmd_fis as read-only in the code. Signed-off-by: Alexander Bulekov --- hw/ide/ahci.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff

Re: [PATCH v2 1/2] tests/qtest: Only run fuzz-megasas-test if megasas device is available

2021-01-26 Thread Alexander Bulekov
On 210126 1851, Thomas Huth wrote: > On 26/01/2021 12.16, Philippe Mathieu-Daudé wrote: > > This test fails when QEMU is built without the megasas device, > > restrict it to its availability. > > > > Signed-off-by: Philippe Mathieu-Daudé > > --- > > tests/qtest/fuzz-megasas-test.c | 49

Re: [PATCH] hw/sd/sdhci: Do not modify BlockSizeRegister if transaction in progress

2021-02-09 Thread Alexander Bulekov
5 > > > >> #3 0x55ab476f102a in pci_qdev_realize hw/pci/pci.c:2108:9 > > > >> #4 0x55ab48baaad2 in device_set_realized hw/core/qdev.c:761:13 > > > >> > > > >> SUMMARY: AddressSanitizer: heap-buffer-overflow > > > >>

Re: [PATCH v2 0/2] block: Use 'read-zeroes=true' mode by default with 'null-co' driver

2021-02-11 Thread Alexander Bulekov
On 210211 1526, Philippe Mathieu-Daudé wrote: > The null-co driver doesn't zeroize buffer in its default config, > because it is designed for testing and tests want to run fast. > However this confuses security researchers (access to uninit > buffers). > Interesting.. Is there an example bug repo

Re: [PATCH] hw/sd: sdhci: Do not transfer any data when command fails

2021-02-11 Thread Alexander Bulekov
u.org > Fixes: CVE-2020-17380 > Fixes: CVE-2020-25085 > Reported-by: Alexander Bulekov > Reported-by: Sergej Schumilo (Ruhr-University Bochum) > Reported-by: Cornelius Aschermann (Ruhr-University Bochum) > Reported-by: Simon Wrner (Ruhr-University Bochum) Reported-by: Muhammad Ramdh

Re: [PATCH] hw/sd: sdhci: Do not transfer any data when command fails

2021-02-11 Thread Alexander Bulekov
u.org > Fixes: CVE-2020-17380 > Fixes: CVE-2020-25085 > Reported-by: Alexander Bulekov > Reported-by: Sergej Schumilo (Ruhr-University Bochum) > Reported-by: Cornelius Aschermann (Ruhr-University Bochum) > Reported-by: Simon Wrner (Ruhr-University Bochum) > Buglink: https://bugs.l

Re: [PATCH] hw/sd/sdhci: Do not modify BlockSizeRegister if transaction in progress

2021-02-11 Thread Alexander Bulekov
able: 00 > Heap left redzone: fa > Freed heap region: fd > ==2686219==ABORTING > > Fixes: CVE-2020-17380 > Fixes: CVE-2020-25085 > Signed-off-by: Philippe Mathieu-Daudé I applied this along with <1612868085-72809-1-git-send-email-bmeng..

Re: [PATCH] hw/sd/sdhci: Do not modify BlockSizeRegister if transaction in progress

2021-02-11 Thread Alexander Bulekov
On 210211 2045, Philippe Mathieu-Daudé wrote: > Hi Alexander, > > On 2/11/21 6:04 PM, Alexander Bulekov wrote: > > On 210208 2034, Philippe Mathieu-Daudé wrote: > >> Per the "SD Host Controller Simplified Specification Version 2.00" > >

Re: [PATCH] hw/sd: sdhci: Do not transfer any data when command fails

2021-02-11 Thread Alexander Bulekov
On 210211 1154, Alexander Bulekov wrote: ... > I applied this along with <20210208193450.2689517-1-f4...@amsat.org> > "hw/sd/sdhci: Do not modify BlockSizeRegister if transaction in progress" > > I ran through the entire OSS-Fuzz corpus, and could not reproduce

Re: [PATCH 0/4] hw/sd: sdhci: Fixes to CVE-2020-17380, CVE-2020-25085, CVE-2021-3409

2021-02-15 Thread Alexander Bulekov
Hi Bin, Thank you for this. I ran through the OSS-Fuzz tests again, and it found one thing: Maybe this is already much better than the current state of the code, so this one can be fixed in a later patch? cat << EOF | ./qemu-system-i386 -display none -machine accel=qtest \ -m 512M -nodefaults -de

Re: [PATCH 0/4] hw/sd: sdhci: Fixes to CVE-2020-17380, CVE-2020-25085, CVE-2021-3409

2021-02-15 Thread Alexander Bulekov
On 210216 0855, Bin Meng wrote: > Hi Alex, > > On Tue, Feb 16, 2021 at 12:48 AM Alexander Bulekov wrote: > > > > Hi Bin, > > Thank you for this. I ran through the OSS-Fuzz tests again, and it found > > one thing: > > Thanks for testing. Are there instruct

Re: [PATCH v2 0/6] hw/sd: sdhci: Fixes to CVE-2020-17380, CVE-2020-25085, CVE-2021-3409

2021-02-16 Thread Alexander Bulekov
Hi Bin, For this series, Tested-by: Alexander Bulekov Thank you -Alex On 210216 1146, Bin Meng wrote: > This series includes several fixes to CVE-2020-17380, CVE-2020-25085 > and CVE-2021-3409 that are heap-based buffer overflow issues existing > in the sdhci model. > > These

Re: [PATCH v2 4/6] hw/sd: sdhci: Simplify updating s->prnsts in sdhci_sdma_transfer_multi_blocks()

2021-02-17 Thread Alexander Bulekov
On 210216 1146, Bin Meng wrote: > s->prnsts is updated in both branches of the if () else () statement. > Move the common bits outside so that it is cleaner. > > Signed-off-by: Bin Meng Reviewed-by: Alexander Bulekov > --- > > (no changes since v1) > > hw/sd

Re: [PATCH 1/2] hw/ide/core.c (cmd_read_native_max): Avoid limited device parameters

2023-09-01 Thread Alexander Bulekov
t; One consequence of the prior behavior was that setting zero sectors > >> per track could lead to an FPE within ide_set_sector(). Thanks to > >> Alexander Bulekov for reporting this issue. > >> > >> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1243 > >&g