<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/net/9p, branch v6.12.80</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.12.80'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-03-04T12:21:22+00:00</updated>
<entry>
<title>9p/xen: protect xen_9pfs_front_free against concurrent calls</title>
<updated>2026-03-04T12:21:22+00:00</updated>
<author>
<name>Stefano Stabellini</name>
<email>stefano.stabellini@amd.com</email>
</author>
<published>2026-01-29T23:03:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a5d00dff97118a32fcf5fec7a4c3f864c4620c4e'/>
<id>urn:sha1:a5d00dff97118a32fcf5fec7a4c3f864c4620c4e</id>
<content type='text'>
[ Upstream commit ce8ded2e61f47747e31eeefb44dc24a2160a7e32 ]

The xenwatch thread can race with other back-end change notifications
and call xen_9pfs_front_free() twice, hitting the observed general
protection fault due to a double-free. Guard the teardown path so only
one caller can release the front-end state at a time, preventing the
crash.

This is a fix for the following double-free:

[   27.052347] Oops: general protection fault, probably for non-canonical address 0x6b6b6b6b6b6b6b6b: 0000 [#1] SMP DEBUG_PAGEALLOC NOPTI
[   27.052357] CPU: 0 UID: 0 PID: 32 Comm: xenwatch Not tainted 6.18.0-02087-g51ab33fc0a8b-dirty #60 PREEMPT(none)
[   27.052363] RIP: e030:xen_9pfs_front_free+0x1d/0x150
[   27.052368] Code: 90 90 90 90 90 90 90 90 90 90 90 90 90 41 55 41 54 55 48 89 fd 48 c7 c7 48 d0 92 85 53 e8 cb cb 05 00 48 8b 45 08 48 8b 55 00 &lt;48&gt; 3b 28 0f 85 f9 28 35 fe 48 3b 6a 08 0f 85 ef 28 35 fe 48 89 42
[   27.052377] RSP: e02b:ffffc9004016fdd0 EFLAGS: 00010246
[   27.052381] RAX: 6b6b6b6b6b6b6b6b RBX: ffff88800d66e400 RCX: 0000000000000000
[   27.052385] RDX: 6b6b6b6b6b6b6b6b RSI: 0000000000000000 RDI: 0000000000000000
[   27.052389] RBP: ffff88800a887040 R08: 0000000000000000 R09: 0000000000000000
[   27.052393] R10: 0000000000000000 R11: 0000000000000000 R12: ffff888009e46b68
[   27.052397] R13: 0000000000000200 R14: 0000000000000000 R15: ffff88800a887040
[   27.052404] FS:  0000000000000000(0000) GS:ffff88808ca57000(0000) knlGS:0000000000000000
[   27.052408] CS:  e030 DS: 0000 ES: 0000 CR0: 0000000080050033
[   27.052412] CR2: 00007f9714004360 CR3: 0000000004834000 CR4: 0000000000050660
[   27.052418] Call Trace:
[   27.052420]  &lt;TASK&gt;
[   27.052422]  xen_9pfs_front_changed+0x5d5/0x720
[   27.052426]  ? xenbus_otherend_changed+0x72/0x140
[   27.052430]  ? __pfx_xenwatch_thread+0x10/0x10
[   27.052434]  xenwatch_thread+0x94/0x1c0
[   27.052438]  ? __pfx_autoremove_wake_function+0x10/0x10
[   27.052442]  kthread+0xf8/0x240
[   27.052445]  ? __pfx_kthread+0x10/0x10
[   27.052449]  ? __pfx_kthread+0x10/0x10
[   27.052452]  ret_from_fork+0x16b/0x1a0
[   27.052456]  ? __pfx_kthread+0x10/0x10
[   27.052459]  ret_from_fork_asm+0x1a/0x30
[   27.052463]  &lt;/TASK&gt;
[   27.052465] Modules linked in:
[   27.052471] ---[ end trace 0000000000000000 ]---

Signed-off-by: Stefano Stabellini &lt;stefano.stabellini@amd.com&gt;
Message-ID: &lt;20260129230348.2390470-1-stefano.stabellini@amd.com&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>9p/trans_fd: p9_fd_request: kick rx thread if EPOLLIN</title>
<updated>2025-11-13T20:34:34+00:00</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2025-08-19T16:10:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2e1461034aef99e905a1fe5589aaf00eaea73eee'/>
<id>urn:sha1:2e1461034aef99e905a1fe5589aaf00eaea73eee</id>
<content type='text'>
[ Upstream commit e8fe3f07a357c39d429e02ca34f740692d88967a ]

p9_read_work() doesn't set Rworksched and doesn't do schedule_work(m-&gt;rq)
if list_empty(&amp;m-&gt;req_list).

However, if the pipe is full, we need to read more data and this used to
work prior to commit aaec5a95d59615 ("pipe_read: don't wake up the writer
if the pipe is still full").

p9_read_work() does p9_fd_read() -&gt; ... -&gt; anon_pipe_read() which (before
the commit above) triggered the unnecessary wakeup. This wakeup calls
p9_pollwake() which kicks p9_poll_workfn() -&gt; p9_poll_mux(), p9_poll_mux()
will notice EPOLLIN and schedule_work(&amp;m-&gt;rq).

This no longer happens after the optimization above, change p9_fd_request()
to use p9_poll_mux() instead of only checking for EPOLLOUT.

Reported-by: syzbot+d1b5dace43896bc386c3@syzkaller.appspotmail.com
Tested-by: syzbot+d1b5dace43896bc386c3@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/all/68a2de8f.050a0220.e29e5.0097.GAE@google.com/
Link: https://lore.kernel.org/all/67dedd2f.050a0220.31a16b.003f.GAE@google.com/
Co-developed-by: K Prateek Nayak &lt;kprateek.nayak@amd.com&gt;
Signed-off-by: K Prateek Nayak &lt;kprateek.nayak@amd.com&gt;
Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Tested-by: K Prateek Nayak &lt;kprateek.nayak@amd.com&gt;
Message-ID: &lt;20250819161013.GB11345@redhat.com&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net/9p: Fix buffer overflow in USB transport layer</title>
<updated>2025-10-15T10:00:24+00:00</updated>
<author>
<name>Dominique Martinet</name>
<email>asmadeus@codewreck.org</email>
</author>
<published>2025-06-22T13:39:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0da18d49f874d444ad83c8a546fa33bfcf2f582c'/>
<id>urn:sha1:0da18d49f874d444ad83c8a546fa33bfcf2f582c</id>
<content type='text'>
commit c04db81cd0288dfc68b7a0f7d09bd49b40bba451 upstream.

A buffer overflow vulnerability exists in the USB 9pfs transport layer
where inconsistent size validation between packet header parsing and
actual data copying allows a malicious USB host to overflow heap buffers.

The issue occurs because:
- usb9pfs_rx_header() validates only the declared size in packet header
- usb9pfs_rx_complete() uses req-&gt;actual (actual received bytes) for
memcpy

This allows an attacker to craft packets with small declared size
(bypassing validation) but large actual payload (triggering overflow
in memcpy).

Add validation in usb9pfs_rx_complete() to ensure req-&gt;actual does not
exceed the buffer capacity before copying data.

Reported-by: Yuhao Jiang &lt;danisjiang@gmail.com&gt;
Closes: https://lkml.kernel.org/r/20250616132539.63434-1-danisjiang@gmail.com
Fixes: a3be076dc174 ("net/9p/usbg: Add new usb gadget function transport")
Cc: stable@vger.kernel.org
Message-ID: &lt;20250622-9p-usb_overflow-v3-1-ab172691b946@codewreck.org&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net/9p: fix double req put in p9_fd_cancelled</title>
<updated>2025-10-12T10:57:19+00:00</updated>
<author>
<name>Nalivayko Sergey</name>
<email>Sergey.Nalivayko@kaspersky.com</email>
</author>
<published>2025-07-15T15:48:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=716dceb19a9f8ff6c9d3aee5a771a93d6a47a0b6'/>
<id>urn:sha1:716dceb19a9f8ff6c9d3aee5a771a93d6a47a0b6</id>
<content type='text'>
commit 674b56aa57f9379854cb6798c3bbcef7e7b51ab7 upstream.

Syzkaller reports a KASAN issue as below:

general protection fault, probably for non-canonical address 0xfbd59c0000000021: 0000 [#1] PREEMPT SMP KASAN NOPTI
KASAN: maybe wild-memory-access in range [0xdead000000000108-0xdead00000000010f]
CPU: 0 PID: 5083 Comm: syz-executor.2 Not tainted 6.1.134-syzkaller-00037-g855bd1d7d838 #0
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014
RIP: 0010:__list_del include/linux/list.h:114 [inline]
RIP: 0010:__list_del_entry include/linux/list.h:137 [inline]
RIP: 0010:list_del include/linux/list.h:148 [inline]
RIP: 0010:p9_fd_cancelled+0xe9/0x200 net/9p/trans_fd.c:734

Call Trace:
 &lt;TASK&gt;
 p9_client_flush+0x351/0x440 net/9p/client.c:614
 p9_client_rpc+0xb6b/0xc70 net/9p/client.c:734
 p9_client_version net/9p/client.c:920 [inline]
 p9_client_create+0xb51/0x1240 net/9p/client.c:1027
 v9fs_session_init+0x1f0/0x18f0 fs/9p/v9fs.c:408
 v9fs_mount+0xba/0xcb0 fs/9p/vfs_super.c:126
 legacy_get_tree+0x108/0x220 fs/fs_context.c:632
 vfs_get_tree+0x8e/0x300 fs/super.c:1573
 do_new_mount fs/namespace.c:3056 [inline]
 path_mount+0x6a6/0x1e90 fs/namespace.c:3386
 do_mount fs/namespace.c:3399 [inline]
 __do_sys_mount fs/namespace.c:3607 [inline]
 __se_sys_mount fs/namespace.c:3584 [inline]
 __x64_sys_mount+0x283/0x300 fs/namespace.c:3584
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x35/0x80 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x6e/0xd8

This happens because of a race condition between:

- The 9p client sending an invalid flush request and later cleaning it up;
- The 9p client in p9_read_work() canceled all pending requests.

      Thread 1                              Thread 2
    ...
    p9_client_create()
    ...
    p9_fd_create()
    ...
    p9_conn_create()
    ...
    // start Thread 2
    INIT_WORK(&amp;m-&gt;rq, p9_read_work);
                                        p9_read_work()
    ...
    p9_client_rpc()
    ...
                                        ...
                                        p9_conn_cancel()
                                        ...
                                        spin_lock(&amp;m-&gt;req_lock);
    ...
    p9_fd_cancelled()
    ...
                                        ...
                                        spin_unlock(&amp;m-&gt;req_lock);
                                        // status rewrite
                                        p9_client_cb(m-&gt;client, req, REQ_STATUS_ERROR)
                                        // first remove
                                        list_del(&amp;req-&gt;req_list);
                                        ...

    spin_lock(&amp;m-&gt;req_lock)
    ...
    // second remove
    list_del(&amp;req-&gt;req_list);
    spin_unlock(&amp;m-&gt;req_lock)
  ...

Commit 74d6a5d56629 ("9p/trans_fd: Fix concurrency del of req_list in
p9_fd_cancelled/p9_read_work") fixes a concurrency issue in the 9p filesystem
client where the req_list could be deleted simultaneously by both
p9_read_work and p9_fd_cancelled functions, but for the case where req-&gt;status
equals REQ_STATUS_RCVD.

Update the check for req-&gt;status in p9_fd_cancelled to skip processing not
just received requests, but anything that is not SENT, as whatever
changed the state from SENT also removed the request from its list.

Found by Linux Verification Center (linuxtesting.org) with Syzkaller.

Fixes: afd8d6541155 ("9P: Add cancelled() to the transport functions.")
Cc: stable@vger.kernel.org
Signed-off-by: Nalivayko Sergey &lt;Sergey.Nalivayko@kaspersky.com&gt;
Message-ID: &lt;20250715154815.3501030-1-Sergey.Nalivayko@kaspersky.com&gt;
[updated the check from status == RECV || status == ERROR to status != SENT]
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>9p/trans_fd: mark concurrent read and writes to p9_conn-&gt;err</title>
<updated>2025-05-02T05:59:20+00:00</updated>
<author>
<name>Ignacio Encinas</name>
<email>ignacio@iencinas.com</email>
</author>
<published>2025-03-18T21:39:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=18296b595176f3975b618a574c40853a3d6326bb'/>
<id>urn:sha1:18296b595176f3975b618a574c40853a3d6326bb</id>
<content type='text'>
[ Upstream commit fbc0283fbeae27b88448c90305e738991457fee2 ]

Writes for the error value of a connection are spinlock-protected inside
p9_conn_cancel, but lockless reads are present elsewhere to avoid
performing unnecessary work after an error has been met.

Mark the write and lockless reads to make KCSAN happy. Mark the write as
exclusive following the recommendation in "Lock-Protected Writes with
Lockless Reads" in tools/memory-model/Documentation/access-marking.txt
while we are at it.

Mark p9_fd_request and p9_conn_cancel m-&gt;err reads despite the fact that
they do not race with concurrent writes for stylistic reasons.

Reported-by: syzbot+d69a7cc8c683c2cb7506@syzkaller.appspotmail.com
Reported-by: syzbot+483d6c9b9231ea7e1851@syzkaller.appspotmail.com
Signed-off-by: Ignacio Encinas &lt;ignacio@iencinas.com&gt;
Message-ID: &lt;20250318-p9_conn_err_benign_data_race-v3-1-290bb18335cc@iencinas.com&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>9p/net: fix improper handling of bogus negative read/write replies</title>
<updated>2025-05-02T05:59:20+00:00</updated>
<author>
<name>Dominique Martinet</name>
<email>asmadeus@codewreck.org</email>
</author>
<published>2025-03-19T11:20:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c548f95688e2b5ae0e2ae43d53cf717156c7d034'/>
<id>urn:sha1:c548f95688e2b5ae0e2ae43d53cf717156c7d034</id>
<content type='text'>
[ Upstream commit d0259a856afca31d699b706ed5e2adf11086c73b ]

In p9_client_write() and p9_client_read_once(), if the server
incorrectly replies with success but a negative write/read count then we
would consider written (negative) &lt;= rsize (positive) because both
variables were signed.

Make variables unsigned to avoid this problem.

The reproducer linked below now fails with the following error instead
of a null pointer deref:
9pnet: bogus RWRITE count (4294967295 &gt; 3)

Reported-by: Robert Morris &lt;rtm@mit.edu&gt;
Closes: https://lore.kernel.org/16271.1734448631@26-5-164.dynamic.csail.mit.edu
Message-ID: &lt;20250319-9p_unsigned_rw-v3-1-71327f1503d0@codewreck.org&gt;
Reviewed-by: Christian Schoenebeck &lt;linux_oss@crudebyte.com&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>9p/xen: fix release of IRQ</title>
<updated>2024-12-05T13:03:06+00:00</updated>
<author>
<name>Alex Zenla</name>
<email>alex@edera.dev</email>
</author>
<published>2024-11-21T22:51:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=530bc9f03a102fac95b07cda513bfc16ff69e0ee'/>
<id>urn:sha1:530bc9f03a102fac95b07cda513bfc16ff69e0ee</id>
<content type='text'>
[ Upstream commit e43c608f40c065b30964f0a806348062991b802d ]

Kernel logs indicate an IRQ was double-freed.

Pass correct device ID during IRQ release.

Fixes: 71ebd71921e45 ("xen/9pfs: connect to the backend")
Signed-off-by: Alex Zenla &lt;alex@edera.dev&gt;
Signed-off-by: Alexander Merritt &lt;alexander@edera.dev&gt;
Signed-off-by: Ariadne Conill &lt;ariadne@ariadne.space&gt;
Reviewed-by: Juergen Gross &lt;jgross@suse.com&gt;
Message-ID: &lt;20241121225100.5736-1-alexander@edera.dev&gt;
[Dominique: remove confusing variable reset to 0]
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>9p/xen: fix init sequence</title>
<updated>2024-12-05T13:03:06+00:00</updated>
<author>
<name>Alex Zenla</name>
<email>alex@edera.dev</email>
</author>
<published>2024-11-19T21:16:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=592fb738d8682bbeabf8acd4c3b207b64266dbc9'/>
<id>urn:sha1:592fb738d8682bbeabf8acd4c3b207b64266dbc9</id>
<content type='text'>
[ Upstream commit 7ef3ae82a6ebbf4750967d1ce43bcdb7e44ff74b ]

Large amount of mount hangs observed during hotplugging of 9pfs devices. The
9pfs Xen driver attempts to initialize itself more than once, causing the
frontend and backend to disagree: the backend listens on a channel that the
frontend does not send on, resulting in stalled processing.

Only allow initialization of 9p frontend once.

Fixes: c15fe55d14b3b ("9p/xen: fix connection sequence")
Signed-off-by: Alex Zenla &lt;alex@edera.dev&gt;
Signed-off-by: Alexander Merritt &lt;alexander@edera.dev&gt;
Signed-off-by: Ariadne Conill &lt;ariadne@ariadne.space&gt;
Reviewed-by: Juergen Gross &lt;jgross@suse.com&gt;
Message-ID: &lt;20241119211633.38321-1-alexander@edera.dev&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>net/9p/usbg: fix handling of the failed kzalloc() memory allocation</title>
<updated>2024-12-05T13:03:05+00:00</updated>
<author>
<name>Mirsad Todorovac</name>
<email>mtodorovac69@gmail.com</email>
</author>
<published>2024-11-09T21:18:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2cdb416de8b5795fd25fadcb69e1198b6df6d8cc'/>
<id>urn:sha1:2cdb416de8b5795fd25fadcb69e1198b6df6d8cc</id>
<content type='text'>
[ Upstream commit ff1060813d9347e8c45c8b8cff93a4dfdb6726ad ]

On the linux-next, next-20241108 vanilla kernel, the coccinelle tool gave the
following error report:

./net/9p/trans_usbg.c:912:5-11: ERROR: allocation function on line 911 returns
NULL not ERR_PTR on failure

kzalloc() failure is fixed to handle the NULL return case on the memory exhaustion.

Fixes: a3be076dc174d ("net/9p/usbg: Add new usb gadget function transport")
Cc: Michael Grzeschik &lt;m.grzeschik@pengutronix.de&gt;
Cc: Eric Van Hensbergen &lt;ericvh@kernel.org&gt;
Cc: Latchesar Ionkov &lt;lucho@ionkov.net&gt;
Cc: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
Cc: Christian Schoenebeck &lt;linux_oss@crudebyte.com&gt;
Cc: v9fs@lists.linux.dev
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Mirsad Todorovac &lt;mtodorovac69@gmail.com&gt;
Message-ID: &lt;20241109211840.721226-2-mtodorovac69@gmail.com&gt;
Signed-off-by: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>9p: fix slab cache name creation for real</title>
<updated>2024-10-21T22:41:29+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2024-10-21T18:57:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a360f311f57a36e96d88fa8086b749159714dcd2'/>
<id>urn:sha1:a360f311f57a36e96d88fa8086b749159714dcd2</id>
<content type='text'>
This was attempted by using the dev_name in the slab cache name, but as
Omar Sandoval pointed out, that can be an arbitrary string, eg something
like "/dev/root".  Which in turn trips verify_dirent_name(), which fails
if a filename contains a slash.

So just make it use a sequence counter, and make it an atomic_t to avoid
any possible races or locking issues.

Reported-and-tested-by: Omar Sandoval &lt;osandov@fb.com&gt;
Link: https://lore.kernel.org/all/ZxafcO8KWMlXaeWE@telecaster.dhcp.thefacebook.com/
Fixes: 79efebae4afc ("9p: Avoid creating multiple slab caches with the same name")
Acked-by: Vlastimil Babka &lt;vbabka@suse.cz&gt;
Cc: Dominique Martinet &lt;asmadeus@codewreck.org&gt;
Cc: Thorsten Leemhuis &lt;regressions@leemhuis.info&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
