[PATCH 0/5] 9p: bound zero-copy error replies and keep flushed requests until the device returns them

From: Lianjie Wang

Date: Mon Nov 09 2026 - 05:54:27 EST


This series fixes memory errors caused by a misbehaving virtio-9p device
in zero-copy requests and in the flush of an interrupted request. A
correct device can also cause a double put, which is fixed in patch 3. A
zero-copy write interrupted by a fatal signal can also overwrite a later
write to the same file, which is fixed in patch 4.

The patches were tested with QEMU modified to send the malformed or slow
replies.

Lianjie Wang (5):
9p/virtio: clamp the reply size of a zero-copy request
9p: ignore a zero-copy reply that arrives after a fatal signal
9p/virtio: keep a request until the device returns it
9p: take the tag of a flushed request from the request
9p/virtio: keep zero-copy buffers until the device returns them

include/net/9p/client.h | 6 ++
net/9p/client.c | 19 +++---
net/9p/trans_virtio.c | 130 ++++++++++++++++++++++++++++------------
3 files changed, 106 insertions(+), 49 deletions(-)


base-commit: 7475ea8b58616b33c04afb976cf0fbaad9dd63fb
--
2.56.0