From: Christian Schoenebeck <qemu_oss@crudebyte.com>
To: qemu-devel@nongnu.org, qemu-stable@nongnu.org
Cc: Greg Kurz <groug@kaod.org>, Feifan Qian <bea1e@proton.me>
Subject: Re: [PATCH 0/3] 9pfs: fix invalid union V9fsFidOpenState access
Date: Fri, 26 Jun 2026 13:23:42 +0200 [thread overview]
Message-ID: <2836963.mvXUDI8C0e@weasel> (raw)
In-Reply-To: <cover.1781621428.git.qemu_oss@crudebyte.com>
On Tuesday, 16 June 2026 17:00:11 CEST Christian Schoenebeck wrote:
> The individual FID types (P9_FID_NONE, P9_FID_FILE, P9_FID_DIR,
> P9_FID_XATTR) share union V9fsFidOpenState with FID-type specific fields.
> Accessing any of the union fields must comply with the FID-type to avoid
> undefined behaviour or information disclosure.
>
> This series fixes invalid access of this union type at several locations.
>
> * Patch 1 and Patch 2 are the core fixes checking the FID type on protocol
> level (9p.c) before allowing access to a FID-type specific union field.
>
> * Patch 3 adds another safety layer by returning -1 from local_fid_fd() if
> the FID type would not have a valid file descriptor.
>
> Christian Schoenebeck (3):
> hw/9pfs: fix invalid union access by v9fs_co_fsync()
> hw/9pfs: fix invalid union access by v9fs_co_fstat()
> hw/9pfs/local: harden local_fid_fd() on FID types
>
> hw/9pfs/9p-local.c | 5 ++++-
> hw/9pfs/9p.c | 17 +++++++++++++++++
> 2 files changed, 21 insertions(+), 1 deletion(-)
Queued on 9p.next:
https://github.com/cschoenebeck/qemu/commits/9p.next
Thanks!
/Christian
prev parent reply other threads:[~2026-06-26 11:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-16 15:00 [PATCH 0/3] 9pfs: fix invalid union V9fsFidOpenState access Christian Schoenebeck
2026-06-16 15:00 ` [PATCH 1/3] hw/9pfs: fix invalid union access by v9fs_co_fsync() Christian Schoenebeck
2026-06-16 15:00 ` [PATCH 2/3] hw/9pfs: fix invalid union access by v9fs_co_fstat() Christian Schoenebeck
2026-06-16 15:00 ` [PATCH 3/3] hw/9pfs/local: harden local_fid_fd() on FID types Christian Schoenebeck
2026-06-17 7:27 ` [PATCH 0/3] 9pfs: fix invalid union V9fsFidOpenState access Michael Tokarev
2026-06-17 8:10 ` Christian Schoenebeck
2026-06-17 9:35 ` Michael Tokarev
2026-06-17 9:59 ` Christian Schoenebeck
2026-06-17 10:43 ` Michael Tokarev
2026-06-17 11:49 ` Christian Schoenebeck
2026-06-26 11:23 ` Christian Schoenebeck [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2836963.mvXUDI8C0e@weasel \
--to=qemu_oss@crudebyte.com \
--cc=bea1e@proton.me \
--cc=groug@kaod.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox