mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jürgen Groß" <jgross@suse.com>
To: Stefano Stabellini <sstabellini@kernel.org>,
	Yifei Gao <gyf161023@gmail.com>
Cc: Eric Van Hensbergen <ericvh@kernel.org>,
	Latchesar Ionkov <lucho@ionkov.net>,
	Dominique Martinet <asmadeus@codewreck.org>,
	v9fs@lists.linux.dev,
	Christian Schoenebeck <linux_oss@crudebyte.com>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] 9p/xen: fix refcount leak in p9_xen_response() on wrong tag
Date: Wed, 5 Aug 2026 09:13:31 +0200	[thread overview]
Message-ID: <931b763d-2ee6-4fbf-9222-c5b75f35ec47@suse.com> (raw)
In-Reply-To: <ebcebd30-68e2-1650-f0e6-b69e4239619c@kernel.org>


[-- Attachment #1.1.1: Type: text/plain, Size: 1161 bytes --]

On 05.08.26 02:06, Stefano Stabellini wrote:
> On Tue, 4 Aug 2026, Yifei Gao wrote:
>> p9_xen_response() looks up the request for an incoming reply with
>> p9_tag_lookup(), which takes a reference on the returned p9_req_t. When
>> the tag does not resolve to a request in REQ_STATUS_SENT, the function
>> warns and continues the loop without dropping that reference, permanently
>> leaking the p9_req_t and its msize buffers. The reply header, including
>> the tag, is supplied by the backend, so a malicious or buggy 9P backend
>> can leak kernel memory on every crafted response.
> 
> Most backend are trusted, including this. So I would avoid "malicious".

No, I think this is fine.

Especially with driver domains malicious backends are a thing. They should
only be capable to deliver wrong or no data to the frontend, but ideally
the frontend should not trust the backend.

Any work towards that goal is to be supported IMHO, and there are already
frontends listed in Xen's support statement following this rule, so any
violation of that principle in those frontends will be regarded to be a
security issue worth an XSA.


Juergen

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3743 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

  reply	other threads:[~2026-08-05  7:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-04 21:35 Yifei Gao
2026-08-05  0:06 ` Stefano Stabellini
2026-08-05  7:13   ` Jürgen Groß [this message]
2026-08-06 14:42 ` [PATCH v2] " Yifei Gao
2026-09-13  9:57   ` Dominique Martinet

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=931b763d-2ee6-4fbf-9222-c5b75f35ec47@suse.com \
    --to=jgross@suse.com \
    --cc=asmadeus@codewreck.org \
    --cc=boris.ostrovsky@oracle.com \
    --cc=ericvh@kernel.org \
    --cc=gyf161023@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux_oss@crudebyte.com \
    --cc=lucho@ionkov.net \
    --cc=sstabellini@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=v9fs@lists.linux.dev \
    --cc=xen-devel@lists.xenproject.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

all inboxes | Powered by JetHome®