mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] coda: check and serialize Venus replies
@ 2026-12-05  5:48 Mar Dominguez
  2026-12-05  5:50 ` [PATCH 1/3] coda: bound the symlink target in venus_readlink() Mar Dominguez
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Mar Dominguez @ 2026-12-05  5:48 UTC (permalink / raw)
  To: Jan Harkes, coda, codalist, Christian Brauner, Alexander Viro,
	linux-fsdevel, linux-kernel

Three fixes for the Coda upcall path.

Patches 1 and 2 check the symlink target in venus_readlink() and the
pioctl output in venus_pioctl() against the size of the reply from
Venus, instead of using the offset and length in the reply as given.

Patch 3 makes coda_psdev_write() hold vc_mutex until the reply has been
copied, the request is marked done and the waiter has been woken, as
coda_psdev_read() already does.  Until now a waiter that was interrupted
by a signal, or that timed out, in that window unlinked and freed the
request while coda_psdev_write() was still using it.

Tested on x86_64 with KASAN under QEMU using a minimal stand-in Venus
that sends the malformed replies and, for patch 3, interrupts the
waiting process while the reply is copied: KASAN and list-debug reports
before, none after.  Not tested with the real Venus userspace, on other
architectures or on a kernel without KASAN.  A reproducer is available
privately on request.

Found and written with an LLM coding assistant.

Mar Dominguez (3):
  coda: bound the symlink target in venus_readlink()
  coda: bound the pioctl output in venus_pioctl()
  coda: hold vc_mutex while completing a Venus reply

 fs/coda/psdev.c  | 21 +++++++++++++++------
 fs/coda/upcall.c | 23 +++++++++++++++++++----
 2 files changed, 34 insertions(+), 10 deletions(-)


base-commit: 007722b8211f7b34fdf21b1e6a9c32497633ea29
-- 
2.53.0



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

end of thread, other threads:[~2026-12-05 23:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-05  5:48 [PATCH 0/3] coda: check and serialize Venus replies Mar Dominguez
2026-12-05  5:50 ` [PATCH 1/3] coda: bound the symlink target in venus_readlink() Mar Dominguez
2026-12-05  5:53 ` [PATCH 2/3] coda: bound the pioctl output in venus_pioctl() Mar Dominguez
2026-12-05  5:56 ` [PATCH 3/3] coda: hold vc_mutex while completing a Venus reply Mar Dominguez
2026-12-05 23:20 ` [PATCH 0/3] coda: check and serialize Venus replies Jan Harkes
2026-12-05 23:26   ` Mar Dominguez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®