All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] 9pfs: hardening against export root escape (CVE-2026-93834)
@ 2026-11-23 15:31 Christian Schoenebeck
  2026-11-23 15:24 ` [PATCH 1/7] hw/9pfs: local_open_nofollow(): abort on illegal FID path components Christian Schoenebeck
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Christian Schoenebeck @ 2026-11-23 15:31 UTC (permalink / raw)
  To: qemu-devel
  Cc: Greg Kurz, Paolo Bonzini, Marc-André Lureau,
	Daniel P. Berrangé, Pierrick Bouvier

CVE-2026-93834 (fixed by fe9e30899ff) allowed guests to escape from
9p server's export root. Due to that severe impact, it is therefore
worth hardening the 9p server at relevant, affected code locations.

Core patches of this series are the following 2 patches:

 - Patch 1 hardens local_open_nofollow(), the most vulnerable place in 9p
   server for this, as this function does the actual element-wise path walk
   and openat() calls. Key change of this patch is to longer trust the passed
   path. The path is instead copied right at the beginning of the function to
   retain an immutable string so that nobody could pull the rug under our feet
   while we are then validating the path string upon that immutable path
   string, and the function would now abort QEMU process on any illegal path,
   not expected at this point, as it means server state is already corrupted.

 - Patch 6 adds a sanity check exactly at those locations in the 9p local
   backend, where a manipulated path would manifest into real filesystem
   action. This new sanity check verifies the V9fsPath object, and again aborts
   the QEMU process loudly in this case, for the same reason described above.
   
Furthermore this series adds a new 9p test suite tests/unit/test-9p-internals.c,
which checks expected behaviour of specific 9p server internal functions.

Christian Schoenebeck (7):
  hw/9pfs: local_open_nofollow(): abort on illegal FID path components
  hw/9pfs: move struct LocalData into 9p-local.h
  meson: move 9pfs-util selection to toplevel meson file
  tests/unit: add forktest.h, a forked-child run-and-verify helper
  tests/unit: add test-9p-internals.c
  hw/9pfs: local: abort on corrupt V9fsPath objects
  tests/9p-internals: test 9p's local_path_sanity_check() function

 MAINTAINERS                    |   2 +
 hw/9pfs/9p-local.c             | 117 +++++++++++++-
 hw/9pfs/9p-local.h             |   5 +
 hw/9pfs/meson.build            |   8 +-
 meson.build                    |  10 ++
 tests/unit/forktest.h          | 132 ++++++++++++++++
 tests/unit/meson.build         |  22 +++
 tests/unit/test-9p-internals.c | 270 +++++++++++++++++++++++++++++++++
 8 files changed, 554 insertions(+), 12 deletions(-)
 create mode 100644 tests/unit/forktest.h
 create mode 100644 tests/unit/test-9p-internals.c

-- 
2.47.3



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-11-23 15:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-23 15:31 [PATCH 0/7] 9pfs: hardening against export root escape (CVE-2026-93834) Christian Schoenebeck
2026-11-23 15:24 ` [PATCH 1/7] hw/9pfs: local_open_nofollow(): abort on illegal FID path components Christian Schoenebeck
2026-11-23 15:24 ` [PATCH 2/7] hw/9pfs: move struct LocalData into 9p-local.h Christian Schoenebeck
2026-11-23 15:24 ` [PATCH 3/7] meson: move 9pfs-util selection to toplevel meson file Christian Schoenebeck
2026-11-23 15:24 ` [PATCH 4/7] tests/unit: add forktest.h, a forked-child run-and-verify helper Christian Schoenebeck
2026-11-23 15:25 ` [PATCH 5/7] tests/unit: add test-9p-internals.c Christian Schoenebeck
2026-11-23 15:25 ` [PATCH 6/7] hw/9pfs: local: abort on corrupt V9fsPath objects Christian Schoenebeck
2026-11-23 15:25 ` [PATCH 7/7] tests/9p-internals: test 9p's local_path_sanity_check() function Christian Schoenebeck

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.