qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Navid Emamdoost <navidem@google.com>
Cc: qemu-devel@nongnu.org, farosas@suse.de, lvivier@redhat.com,
	 pbonzini@redhat.com, zsm@google.com, alxndr@bu.edu,
	 Keith Busch <kbusch@kernel.org>,
	Klaus Jensen <its@irrelevant.dk>,
	 Jesper Devantier <foss@defmacro.it>,
	"open list:nvme" <qemu-block@nongnu.org>
Subject: Re: [PATCH v2 4/5] tests/qtest: Rework nvmetest_oob_cmb_test for BAR check
Date: Thu, 27 Nov 2025 13:29:03 +0000	[thread overview]
Message-ID: <CAFEAcA8t4RVOJY8jLLAY7z7D6UBYVRCnbj-NW4U6a_K3+a1LnA@mail.gmail.com> (raw)
In-Reply-To: <20251127001247.1672873-5-navidem@google.com>

On Thu, 27 Nov 2025 at 00:13, Navid Emamdoost <navidem@google.com> wrote:
>
> The nvmetest_oob_cmb_test was designed to deliberately perform an
> out-of-bounds write on a PCI BAR. This was intended as a regression
> test for CVE-2018-16847.
> The recent change to libqos introduced strict bounds checking on all
> BAR accessors, which correctly caused this test to fail with a fatal
> assertion, as it was performing an illegal memory access.
> This change reworks the test to honor its original intent—verifying
> safe accesses at the BAR boundary—without violating the new API contract.
> Instead of attempting an illegal write, the test now performs several
> valid read/write operations at the very end of the BAR (at offsets
> size - 1, size - 2, and size - 4) to confirm the entire region
> is accessible.
> This makes the test compatible with the safer libqos API while still
> serving as a regression test for the original issue.

This one I'll have to leave for the nvme folks to review.
(You'll want to recast the commit message because this
change has to go before we add the assertions, not after.)

thanks
-- PMM


  reply	other threads:[~2025-11-27 13:29 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-08 19:19 [PATCH 1/2] libqos: pci: Avoid fatal assert on zero-sized BARs in fuzz builds Navid Emamdoost
2025-10-08 19:19 ` [PATCH 2/2] tests/qtest/fuzz: Add generic fuzzer for pcie-pci-bridge Navid Emamdoost
2025-10-10 15:58 ` [PATCH 1/2] libqos: pci: Avoid fatal assert on zero-sized BARs in fuzz builds Alexander Bulekov
2025-10-14  1:14   ` Navid Emamdoost
2025-11-06 18:41     ` Navid Emamdoost
2025-11-13 14:02 ` Peter Maydell
2025-11-25  2:30   ` Navid Emamdoost
2025-11-25 10:01     ` Peter Maydell
2025-11-27  0:12       ` [PATCH v2 0/5] tests/qtest: Rework libqos PCI BAR handling to support fuzzing Navid Emamdoost
2025-11-27  0:12         ` [PATCH v2 1/5] libqos: pci: Handle zero-sized BARs gracefully Navid Emamdoost
2025-11-27 13:17           ` Peter Maydell
2025-12-05  4:16             ` Navid Emamdoost
2025-11-27  0:12         ` [PATCH v2 2/5] libqos: pci: Require size for legacy I/O port mapping Navid Emamdoost
2025-11-27 13:24           ` Peter Maydell
2025-11-27  0:12         ` [PATCH v2 3/5] tests/qtest: ahci-test: Check only implemented ports in verify_state Navid Emamdoost
2025-11-27 13:27           ` Peter Maydell
2025-11-27  0:12         ` [PATCH v2 4/5] tests/qtest: Rework nvmetest_oob_cmb_test for BAR check Navid Emamdoost
2025-11-27 13:29           ` Peter Maydell [this message]
2025-11-27  0:12         ` [PATCH v2 5/5] tests/qtest/fuzz: Add generic fuzzer for pcie-pci-bridge Navid Emamdoost

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=CAFEAcA8t4RVOJY8jLLAY7z7D6UBYVRCnbj-NW4U6a_K3+a1LnA@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=alxndr@bu.edu \
    --cc=farosas@suse.de \
    --cc=foss@defmacro.it \
    --cc=its@irrelevant.dk \
    --cc=kbusch@kernel.org \
    --cc=lvivier@redhat.com \
    --cc=navidem@google.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=zsm@google.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).