qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/7] fix potential hangs in 9pfs
@ 2017-01-10 14:32 Greg Kurz
  2017-01-10 14:32 ` [Qemu-devel] [PATCH 1/7] 9pfs: restrict open to regular files and directories Greg Kurz
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Greg Kurz @ 2017-01-10 14:32 UTC (permalink / raw)
  To: qemu-devel; +Cc: Eric Blake, Aneesh Kumar K.V, Greg Kurz

The 9P open and create operations cause QEMU to call the open(2) syscall on
the backend. Unfortunately, it doesn't check if the given pathname already
exists and points to something that could cause open(2) to hang (like a named
pipe for example).

This series fixes the issues for open (only allow directories and regular
files) and create (enforce O_EXCL). It also adds the corresponding tests in
virtio-9p-test.

---

Greg Kurz (7):
      9pfs: restrict open to regular files and directories
      tests: virtio-9p: improve error reporting
      tests: virtio-9p: add LOPEN operation test
      tests: virtio-9p: TLOPEN should fail to open a FIFO
      9pfs: don't create files if pathname already exists
      tests: virtio-9p: add LCREATE operation test
      tests: virtio-9p: TLCREATE should fail if pathname exists


 hw/9pfs/9p.c           |   10 ++
 tests/virtio-9p-test.c |  197 +++++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 199 insertions(+), 8 deletions(-)

--
Greg

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

end of thread, other threads:[~2017-01-11  9:54 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-10 14:32 [Qemu-devel] [PATCH 0/7] fix potential hangs in 9pfs Greg Kurz
2017-01-10 14:32 ` [Qemu-devel] [PATCH 1/7] 9pfs: restrict open to regular files and directories Greg Kurz
2017-01-10 14:38   ` Eric Blake
2017-01-10 14:41     ` Eric Blake
2017-01-11  9:54     ` Greg Kurz
2017-01-10 14:32 ` [Qemu-devel] [PATCH 2/7] tests: virtio-9p: improve error reporting Greg Kurz
2017-01-10 14:32 ` [Qemu-devel] [PATCH 3/7] tests: virtio-9p: add LOPEN operation test Greg Kurz
2017-01-10 14:32 ` [Qemu-devel] [PATCH 4/7] tests: virtio-9p: TLOPEN should fail to open a FIFO Greg Kurz
2017-01-10 14:32 ` [Qemu-devel] [PATCH 5/7] 9pfs: don't create files if pathname already exists Greg Kurz
2017-01-10 14:32 ` [Qemu-devel] [PATCH 6/7] tests: virtio-9p: add LCREATE operation test Greg Kurz
2017-01-10 14:32 ` [Qemu-devel] [PATCH 7/7] tests: virtio-9p: TLCREATE should fail if pathname exists Greg Kurz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).