9pfs: add race test suite + fix 9p2000.u dir stream race
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest9 patches 1 replyIn review
- v19 patches 1 replySuperseded
Changes in v2 from the cover letter
- Allow skipping these race tests by setting environment variable V9FS_RACE=0, or force running them by setting V9FS_RACE=1 respectively.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | tests/9p-client: add Txattrwalk / Rxattrwalk test client functionstests/ tests/ | +76 | 0 replies | |
| 2/9 | tests/9p-race: add 9p race test suite (race FID-path mutations)MAINTAINERS tests/ tests/ | +577 | 0 replies | |
| 3/9 | tests/9p-client: add Rerror function (legacy 9p2000.u)tests/ tests/ | +12 | 0 replies | |
| 4/9 | tests/9p-client: add Tstat / Rstat test client functionstests/ tests/ | +124 | 0 replies | |
| 5/9 | tests/9p-race: add Treaddir race testtests/ | +84 | 0 replies | |
| 6/9 | hw/9pfs: fix dirent stream protection for legacy (9p2000.u) Treadhw/ | +14 | 0 replies | |
| 7/9 | tests/9p-client: add Tcreate / Rcreate test client functionstests/ tests/ | +110 | 0 replies | |
| 8/9 | tests/9p-client: track the negotiated 9p version for sessiontests/ tests/ | +20 | 0 replies | |
| 9/9 | tests/9p-race: add Tread-on-dir race testtests/ | +393 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/9] 9pfs: add race test suite + fix 9p2000.u dir stream race
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
Signature · 1 line
2.47.3