All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Schoenebeck <qemu_oss@crudebyte.com>
To: qemu-devel@nongnu.org
Cc: qemu-stable@nongnu.org, Greg Kurz <groug@kaod.org>
Subject: [PATCH v2 0/9] 9pfs: add race test suite + fix 9p2000.u dir stream race
Date: Wed, 7 Oct 2026 12:29:22 +0200	[thread overview]
Message-ID: <cover.1791368962.git.qemu_oss@crudebyte.com> (raw)

This series adds a race test suite for 9p and fixes a race on legacy
9p2000(.u)'s Tread request on directories, which was uncovered by this
new test suite.

This new race test suite challenges races by sending crafted concurrent 9p
requests on certain aspects of the 9p protocol. This series covers 3 race
tests:

  1. Patch 2 adds "race/fid-path": this race test guards CVE-2026-93834
     (fixed by commit fe9e30899f "hw/9pfs: Use read-write lock for protecting
     fid path.").

     Please refer to the commit log message of this patch for how to run
     these new 9p race tests in general.

  2. Patch 5 adds "race/readdir": this test guards directory stream races
     on 9p2000.L's Treaddir request.

  3. Patch 9 adds "race/tread-dir": this tests legacy 9p2000(.u)'s equivalent
     of Treaddir for directory stream races, and this test got triggered during
     the work on this series.

Therefore:

  - Fix: Patch 6 fixes the directory stream race vulnerability uncovered by
    race test #3.

All the other patches are basically just 9p test client additions required
for these new tests.

Changes:

  v2:
    - Allow skipping these race tests by setting environment variable
      V9FS_RACE=0, or force running them by setting V9FS_RACE=1 respectively.

Christian Schoenebeck (9):
  tests/9p-client: add Txattrwalk / Rxattrwalk test client functions
  tests/9p-race: add 9p race test suite (race FID-path mutations)
  tests/9p-client: add Rerror function (legacy 9p2000.u)
  tests/9p-client: add Tstat / Rstat test client functions
  tests/9p-race: add Treaddir race test
  hw/9pfs: fix dirent stream protection for legacy (9p2000.u) Tread
  tests/9p-client: add Tcreate / Rcreate test client functions
  tests/9p-client: track the negotiated 9p version for session
  tests/9p-race: add Tread-on-dir race test

 MAINTAINERS                           |    1 +
 hw/9pfs/9p.c                          |   23 +-
 tests/qtest/libqos/virtio-9p-client.c |  213 ++++-
 tests/qtest/libqos/virtio-9p-client.h |  124 +++
 tests/qtest/libqos/virtio-9p.h        |    6 +
 tests/qtest/meson.build               |    1 +
 tests/qtest/virtio-9p-race-test.c     | 1035 +++++++++++++++++++++++++
 7 files changed, 1393 insertions(+), 10 deletions(-)
 create mode 100644 tests/qtest/virtio-9p-race-test.c

-- 
2.47.3



             reply	other threads:[~2026-10-07 10:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-07 10:29 Christian Schoenebeck [this message]
2026-10-07 10:26 ` [PATCH v2 1/9] tests/9p-client: add Txattrwalk / Rxattrwalk test client functions Christian Schoenebeck
2026-10-07 10:27 ` [PATCH v2 2/9] tests/9p-race: add 9p race test suite (race FID-path mutations) Christian Schoenebeck
2026-10-07 10:27 ` [PATCH v2 3/9] tests/9p-client: add Rerror function (legacy 9p2000.u) Christian Schoenebeck
2026-10-07 10:27 ` [PATCH v2 4/9] tests/9p-client: add Tstat / Rstat test client functions Christian Schoenebeck
2026-10-07 10:27 ` [PATCH v2 5/9] tests/9p-race: add Treaddir race test Christian Schoenebeck
2026-10-07 10:27 ` [PATCH v2 6/9] hw/9pfs: fix dirent stream protection for legacy (9p2000.u) Tread Christian Schoenebeck
2026-10-07 10:27 ` [PATCH v2 7/9] tests/9p-client: add Tcreate / Rcreate test client functions Christian Schoenebeck
2026-10-07 10:27 ` [PATCH v2 8/9] tests/9p-client: track the negotiated 9p version for session Christian Schoenebeck
2026-10-07 10:28 ` [PATCH v2 9/9] tests/9p-race: add Tread-on-dir race test Christian Schoenebeck

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=cover.1791368962.git.qemu_oss@crudebyte.com \
    --to=qemu_oss@crudebyte.com \
    --cc=groug@kaod.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.