From: 徐晗翔 <xuhx@hust.edu.cn>
To: trondmy@kernel.org, anna@kernel.org
Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: SUNRPC: rpc_new_client() kfree()s a fully published client on the auth-creation failure path -- use-after-free via concurrent rpc_pipefs mount notifications and via open debugfs/pipefs files (UAF)
Date: Thu, 26 Nov 2026 20:49:46 +0800 (GMT+08:00) [thread overview]
Message-ID: <2806021d.13b2.1a217e7a409.Coremail.xuhx@hust.edu.cn> (raw)
In-Reply-To: <2026102727-data-sequel-ce41@gregkh>
[-- Attachment #1: Type: text/plain, Size: 18648 bytes --]
------------------------------------------------------------------------
rpc_new_client() fully publishes the client inside rpc_client_register()
-- it is placed on the per-network-namespace sn->all_clients list, gets
sysfs and debugfs entries, and, when rpc_pipefs is mounted, a pipedir
with userspace-visible files -- and only then tries to create the auth
handle. When auth creation fails, the error path tears that published
state down and kfree()s the client outright. That kfree() races
(a) concurrent rpc_pipefs mount notifications: the RPC_PIPEFS_MOUNT
notifier chain hands out bare struct rpc_clnt pointers from
sn->all_clients without taking a reference, and the failure path's
err_auth label calls rpc_get_sb_net() *after* it has already
observed rpc_pipefs as unmounted and released pipefs_sb_lock, so
the whole "mount in progress" window runs between that unlock and
the unregister -- with no lock, no reference and no RCU protecting
the client. The ordering that protects the normal release path
(rpc_free_client() unregisters first, rpc_free_client_work() then
removes the pipedir under pipefs_sb_lock, which waits for in-flight
notifications) is exactly inverted on the failure path; and
(b) userspace holding the client's debugfs "tasks" file
(/sys/kernel/debug/sunrpc/rpc_clnt/<clid>/tasks) or pipefs
"<prog>/clntXX/info" file: their open paths take a cl_count
reference (refcount_inc_not_zero()) whose release paths run
rpc_release_client() against the client -- a contract the normal
free path honors via refcount_dec_and_test(), but the constructor
failure path ignores entirely and kfree()s regardless.
Both races are kernel use-after-frees on struct rpc_clnt. One patch
fixing the failure path to use the reference-counted teardown is below;
it removes the inverted err_auth barrier and therefore fixes (a) and (b)
together.
The detailed description:
* Test environment / affected version
Linux version 7.3.0 (gcc 13.3.0, GNU ld 2.42) #1 SMP PREEMPT_DYNAMIC
-- vanilla mainline 7.3 release tree (kernel.org); the audited tree
and the test tree are byte-identical for net/sunrpc/clnt.c, so the
line numbers below are from 7.3. Tested with KASAN enabled in
QEMU/KVM x86_64 guests. The code paths involved are old and stable;
the err_auth label exists in this form in all recent majors.
* Mechanism
Publication order in rpc_client_register() (net/sunrpc/clnt.c):
clnt.c:309 rpc_clnt_debugfs_register() -- debugfs dir + "tasks"
file published, i_private
= clnt
clnt.c:311 pipefs_sb = rpc_get_sb_net() -- NULL when rpc_pipefs is
not mounted: the mutex
is released immediately
clnt.c:313 rpc_setup_pipedir() -- pipedir + "info" file
(only when mounted),
RPC_I(inode)->private =
clnt
clnt.c:318 rpc_register_client() -- list_add on
sn->all_clients under
rpc_client_lock
clnt.c:322 rpcauth_create() -- may sleep for seconds
(request_module() for an
unregistered flavor runs
modprobe) and fails
deterministically for
e.g. sec=krb5 with gssd
not running
(-EINVAL,
auth_gss.c:1044/1051)
Failure path as of 7.3 (clnt.c:330-339):
err_auth:
pipefs_sb = rpc_get_sb_net(net); /* sees NULL, unlocks */
rpc_unregister_client(clnt); /* first time the client
stops being visible */
__rpc_clnt_remove_pipedir(clnt); /* reads clnt->pipefs_sb
without the lock */
...
/* and back in rpc_new_client(): */
out_no_path:
...
kfree(clnt); /* clnt.c:452, ignores
cl_count entirely */
Race (a), the mount-notification window: between rpc_get_sb_net()
returning NULL (lock released) and rpc_unregister_client() completing,
the client is fully reachable with nothing protecting it. The
concurrent mount -t rpc_pipefs runs rpc_fill_super()
(rpc_pipe.c:1145-1150) under pipefs_sb_lock and synchronously calls
the notification chain; rpc_get_client_for_event() (clnt.c:221-235)
scans sn->all_clients, hands back the FIRST client that
rpc_clnt_skip_event() does not skip -- for the failing client
pipe_dir_name != NULL, pdh_dentry == NULL and cl_count == 1, so it is
NOT skipped (clnt.c:162-180) -- releases rpc_client_lock and returns
the bare pointer without a reference. If the mount task is still
processing that pointer (rpc_pipefs_event() -> __rpc_clnt_handle_event()
-> rpc_setup_pipedir_sb() -> rpc_create_client_dir(), which WRITES
clnt->pipefs_sb and cl_pipedir_objects.pdh_dentry) when the failure
path reaches kfree(), every access from there on is a use-after-free
read/write on freed slab. A second interleaving leaves a live
clntXX/info file whose RPC_I(inode)->private points at the freed
client (rpc_create_client_dir() stores the client as the file private
via rpc_new_file(), rpc_pipe.c:873-874/545), so the UAF is also
reachable long after the failing mount returned.
Race (b), file-held references: tasks_open()
(net/sunrpc/debugfs.c:89-103) and rpc_info_open()
(net/sunrpc/rpc_pipe.c:414-436) both do
refcount_inc_not_zero(&clnt->cl_count) at open and
rpc_release_client(clnt) at release -- the kernel's own contract that
"an open file holds a client reference". The normal destruction path
honors it: rpc_release_client() -> rpc_free_auth() only frees through
refcount_dec_and_test(&clnt->cl_count) (clnt.c:1036). The
constructor failure path never decrements at all: it goes straight to
kfree() with external references outstanding. The debugfs core
documents that this is the file owner's responsibility --
full_proxy_release() forwards ->release unconditionally ("Releasers
must not assume that ->i_private is still being meaningful here",
fs/debugfs/file.c:415-425), and debugfs removal does not wait for
open files (only for in-flight operations). The pipefs info file has
no such machinery at all: removal does not wait for openers, and both
read(fd) (rpc_show_info(), rpc_pipe.c:397-412, dereferences
clnt->cl_xprt/cl_program under RCU) and close(fd)
(rpc_info_release() -> rpc_release_client()) hit the freed object.
For contrast, the sysfs side is safe: rpc_sysfs_client_destroy()
goes through kernfs, and kernfs_drain() (fs/kernfs/dir.c:508-556)
waits for in-flight show() to finish.
* Trigger model
Administrator/root actions only (both NFS mounts and rpc_pipefs
mount/umount need CAP_SYS_ADMIN; debugfs is root-visible):
- a mount attempt with sec=krb5 and no running gssd fails
deterministically inside rpcauth_create() -- and if the rpcsec_gss
module is not built in, the request_module() modprobe callout
stretches the published window to seconds;
- concurrently, mount -t rpc_pipefs (race (a)) or simply open
/sys/kernel/debug/sunrpc/rpc_clnt/<clid>/tasks or
/var/lib/nfs/rpc_pipefs/nfs/clntXX/info while the window is open
and hold the fd (race (b)); the debugfs directory name is the
client id and is trivially pollable.
Consequence: KASAN slab-use-after-free on struct rpc_clnt (reads of
cl_count/cl_program/cl_xprt, writes of pipefs_sb/pdh_dentry), slab
corruption, refcount_t underflow warnings, a live orphaned pipedir
whose info-file private points at freed memory (delayed UAF for any
later reader), and a use-after-free escalation chain when the
freed-memory garbage steers rpc_release_client() into
rpc_free_auth()/rpc_free_client() (list_del on freed nodes, double
rpc_free_iostats(), put_cred()/xprt_put()/ida_free() underflows).
* Reproducer (attached: rpcrace.c) and results on 7.3
rpcrace.c is a self-contained verification module (zero kernel-source
changes). It registers a private rpc_authops on an unregistered
flavor slot whose ->create() callback simply holds the
rpc_client_register() publication window open until userspace signals
through a module parameter -- giving a deterministic, arbitrarily wide
window instead of the natural modprobe-sized one -- and drives
rpc_create() from a kernel thread.
# build
make -C <kernel-build-dir> M=$PWD modules
# race (b), pipefs flavor (root; pipefs mounted):
insmod rpcrace.ko mode=mr03pfs hold_ms=8000
# helper: scan /tmp/rpc_pipefs/nfs/ for the new clntXX dir, then:
# exec 9</tmp/rpc_pipefs/nfs/clntXX/info
# echo 1 > /sys/module/rpcrace/parameters/helper_ready # window closes
# sleep 2; cat <&9 > /dev/null; exec 9<&- # read + close
# race (b), debugfs flavor (kernel must have CONFIG_SUNRPC_DEBUG;
# mainline distro kernels that ship debugfs sunrpc have it):
insmod rpcrace.ko mode=mr03dbg hold_ms=8000
# helper: open /sys/kernel/debug/sunrpc/rpc_clnt/<clid>/tasks during
# the window, signal helper_ready, close the fd afterwards
# race (a), notification flavor (pipefs NOT mounted):
insmod rpcrace.ko mode=mr01 stall_ms=4000
# module stalls the failing thread at err_auth with a kprobe; mount
# -t rpc_pipefs concurrently; a second kprobe stalls the mount
# inside rpc_create_client_dir(); release order reproduces the
# audited interleaving
Results (7.3, KASAN, QEMU 8 vCPU; kasan_multi_shot=1):
- mr03pfs: 29 reports. read(fd): slab-use-after-free in
rpc_show_info+0x2a (first hit) and rpc_peeraddr2str (reading
clnt->cl_xprt of the freed client); close(fd):
slab-use-after-free in rpc_release_client+0x25 with
refcount_dec_not_one on the freed cl_count plus
refcount_warn_saturate (the predicted underflow fingerprint).
The KASAN report's alloc and free stacks both terminate in
rpc_new_client() -- allocation and the kfree() on the failure
path -- closing the loop on which object died.
- mr01: the mount task reports "BUG: KASAN: slab-use-after-free in
rpc_create_client_dir+0x63 -- Write of size 8" (the
cl_pipedir_objects.pdh_dentry store) with the full stack
mount -> path_mount -> fc_mount -> get_tree_keyed ->
rpc_fill_super -> blocking_notifier_call_chain -> rpc_pipefs_event
-> rpc_setup_pipedir_sb -> rpc_create_client_dir.
- mr03dbg (diagnostic kernel with CONFIG_SUNRPC_DEBUG=y, config-only
change): close(fd) of the held tasks file reports
slab-use-after-free in rpc_release_client -- confirming that the
debugfs full-proxy release path forwards unconditionally.
Full serial logs and KASAN report excerpts are available on request.
* Related but separate
net/sunrpc/clnt.c also contains a distinct defect in
rpc_switch_client_transport(), which removes the client pipedir
without pipefs_sb_lock and thereby races the RPC_PIPEFS_UMOUNT
notification chain into a double removal; that one is reported in its
own mail, as is a data race in cache_read() (net/sunrpc/cache.c).
* Fix
The patch below rewrites the failure path so that it goes through the
same reference-counted teardown as the normal path: the error exits of
rpc_client_register() leave the client published, and rpc_new_client()
drops its construction reference via rpc_release_client();
rpc_free_client() then unregisters the client, and
rpc_free_client_work() removes any pipedir under pipefs_sb_lock and
frees the client only after every external reference (open files,
in-flight notifications) is gone. This removes the inverted err_auth
barrier entirely, so both (a) and (b) are fixed by one change. The
patch has been reviewed against the ordering argument of the normal
path but has not been runtime-tested; the bugs themselves are
dynamically verified as described above. Happy to test any
alternative proposal.
Please keep me in Cc; I am not subscribed to the lists.
Regards,
Hanxiang Xu
xuhx@hust.edu.cn
------------------------------------------------------------------------
The patch (text/plain; apply with patch -p1 or git am):
From: Hanxiang Xu <xuhx@hust.edu.cn>
Subject: [PATCH] SUNRPC: tear down a failed rpc_new_client() through the
reference-counted path
rpc_new_client() fully publishes the client before it can fail:
rpc_client_register() creates the debugfs entries, creates the pipefs
pipedir (with userspace-visible files whose private points at the
client) and puts the client on sn->all_clients before calling
rpcauth_create(). Two users of that published state are not protected
by the current failure path:
1. Concurrent RPC_PIPEFS_MOUNT notifications. rpc_get_client_for_event()
hands out bare rpc_clnt pointers from sn->all_clients without taking
a reference, and the err_auth label first calls rpc_get_sb_net() --
which, when rpc_pipefs is not mounted, releases pipefs_sb_lock and
returns NULL -- before unregistering. Between that unlock and the
unregister nothing protects the client, so a concurrent mount can be
inside rpc_create_client_dir() writing clnt->pipefs_sb and
cl_pipedir_objects.pdh_dentry when the failure path kfree()s the
client. The normal release path is safe against exactly this
because rpc_free_client() unregisters first and
rpc_free_client_work() removes the pipedir under pipefs_sb_lock,
which waits for in-flight notifications.
2. Userspace holding open debugfs "tasks" or pipefs "info" files.
tasks_open() and rpc_info_open() take a cl_count reference
(refcount_inc_not_zero()); their release paths call
rpc_release_client(). The normal free path only frees through
refcount_dec_and_test(&clnt->cl_count). The constructor failure
path ignores the counter and kfree()s outright, so a file opened
during the window (which includes the request_module() modprobe
callout inside rpcauth_create()) uses the client after free on
close() -- and, for the pipefs info file, already on read().
Fix both by routing the failure path through the reference-counted
teardown: the error exits of rpc_client_register() leave the client
published, and rpc_new_client() drops its construction reference with
rpc_release_client(). rpc_free_client() then unregisters the client,
and rpc_free_client_work() removes any pipedir under pipefs_sb_lock
and frees the client only after the last external reference is
released. The early-failure labels (before any publication) keep
their direct kfree(); the transport and xprt-switch references of the
late path are consumed by xprt_iter_destroy() and
rpc_free_client_work()'s xprt_put(), exactly as on the success path.
The bugs are verified on vanilla 7.3 with a loadable-module
reproducer (choreographed publication window + concurrent mount /
file open); the patch itself has been checked against the ordering
argument of the normal release path but not yet runtime-tested.
Signed-off-by: Hanxiang Xu <xuhx@hust.edu.cn>
---
net/sunrpc/clnt.c | 53 +++++++++++++++++++++++++++++++++++++----------
1 file changed, 40 insertions(+), 13 deletions(-)
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -323,19 +323,28 @@
if (IS_ERR(auth)) {
dprintk("RPC: Couldn't create auth handle (flavor %u)\n",
pseudoflavor);
- err = PTR_ERR(auth);
- goto err_auth;
+ /*
+ * The client is already fully published: it sits on
+ * sn->all_clients and its sysfs, debugfs and (when
+ * rpc_pipefs is mounted) pipedir entries exist. Leave
+ * everything in place; the caller drops its construction
+ * reference through rpc_release_client(), so the standard
+ * teardown only runs after any external cl_count
+ * reference (debugfs/pipefs file opens) is gone.
+ */
+ return PTR_ERR(auth);
}
return 0;
-err_auth:
- pipefs_sb = rpc_get_sb_net(net);
- rpc_unregister_client(clnt);
- __rpc_clnt_remove_pipedir(clnt);
out:
if (pipefs_sb)
rpc_put_sb_net(net);
- rpc_sysfs_client_destroy(clnt);
- rpc_clnt_debugfs_unregister(clnt);
+ /*
+ * Failure before registration in sn->all_clients:
+ * rpc_pipefs_event() cannot reach the client and no pipedir was
+ * published, but the debugfs and sysfs entries may already be
+ * held open. Route this failure through the same
+ * reference-counted teardown in rpc_new_client().
+ */
return err;
}
@@ -444,10 +453,27 @@
return clnt;
out_no_path:
- rpc_free_iostats(clnt->cl_metrics);
-out_no_stats:
- put_cred(clnt->cl_cred);
- rpc_free_clid(clnt);
+ /*
+ * The failure happened after full publication: concurrent
+ * RPC_PIPEFS_MOUNT notifications may hold a bare pointer to the
+ * client (rpc_get_client_for_event() hands one out without taking
+ * a reference), and userspace may hold cl_count references via
+ * the debugfs "tasks" file or the pipefs "<prog>/clntXX/info"
+ * files. Do not free the client here; drop the construction
+ * reference and let the standard teardown run once the last
+ * reference is released: rpc_free_client() unregisters the
+ * client first, and rpc_free_client_work() then removes any
+ * pipedir under pipefs_sb_lock -- waiting for in-flight
+ * mount/umount notifications to complete -- before freeing.
+ * The construction xprt-switch and transport references are
+ * consumed by xprt_iter_destroy() and rpc_free_client_work()'s
+ * xprt_put(), exactly as on the success path, so the put pairs
+ * of the early-failure paths must not run here.
+ */
+ rpc_release_client(clnt);
+ trace_rpc_clnt_new_err(program->name, args->servername, err);
+ return ERR_PTR(err);
+
out_no_clid:
kfree(clnt);
out_err:
net/sunrpc/clnt.c | 50 ++++++++++++++++++++++++++++++++++++++------------
1 file changed, 38 insertions(+), 12 deletions(-)
------------------------------------------------------------------------
[-- Attachment #2: rpcrace.c --]
[-- Type: text/plain, Size: 21734 bytes --]
// SPDX-License-Identifier: GPL-2.0
/*
* rpcrace.c - controlled-window verification instruments for the net/sunrpc
* conditional-race audit cases SUNRPC-MR-01..04
* (docs/manual-review-net-sunrpc-2026-11-25.md, v4).
*
* Methodology follows this environment's established controlled-window
* precedent (r4_stall.c, r1stall.c, fx*): zero kernel-source changes; a
* loadable module drives exported core APIs (rpc_create, rpcauth_register,
* rpc_switch_client_transport, rpc_mkpipe_data/rpc_add_pipe_dir_object,
* cache_create_net/sunrpc_cache_upcall) and kprobe pre-handlers widen the
* natural race windows into deterministic choreographies.
*
* Modes (module param "mode"):
* mr03pfs - SUNRPC-MR-03 pipefs flavor. Custom authops->create() holds the
* rpc_client_register() failure window open until a userspace
* helper has open(2)'d the failing client's <pipefs>/nfs/clntXX/info
* file (open takes a cl_count reference via rpc_info_open). After
* the window closes rpc_new_client() kfree()s the client anyway
* and the helper read()s/closes the fd -> use-after-free in
* rpc_show_info()/rpc_info_release().
* mr03dbg - same choreography against the debugfs "tasks" file
* (/sys/kernel/debug/sunrpc/rpc_clnt/<clid>/tasks, tasks_open
* takes the cl_count reference; full_proxy_release forwards
* tasks_release unconditionally). Only meaningful on a kernel
* built with CONFIG_SUNRPC_DEBUG (debugfs.c compiled in).
* mr01 - SUNRPC-MR-01. Double-kprobe choreography:
* kp1 = rpc_unregister_client entry, claimed by our failing
* client thread at err_auth (after rpc_get_sb_net() already saw
* pipefs unmounted and released pipefs_sb_lock);
* kp2 = rpc_create_client_dir entry, claimed by the concurrent
* "mount -t rpc_pipefs" notifier while it holds pipefs_sb_lock
* and has already written clnt->pipefs_sb = sb.
* Release order (A resumes -> unregister/remove/kfree, then B
* resumes) reproduces the audited interleaving: B writes
* pdh_dentry into the freed rpc_clnt (UAF write) and leaves an
* orphan pipedir whose info file private points at freed memory.
* mr04 - SUNRPC-MR-04. kprobe stall on simple_recursive_removal() when
* called with callback == rpc_close_pipes from the umount task,
* while a module thread drives rpc_switch_client_transport()
* (which calls __rpc_clnt_remove_pipedir() WITHOUT
* pipefs_sb_lock). Both threads read the same pdh_dentry /
* pipe->dentry before either clears it -> the umount thread
* resumes simple_recursive_removal() on the already-freed pipe
* child dentry (use-after-free).
* mr02 - SUNRPC-MR-02 (KCSAN kernel). Module-owned cache_detail
* ("racetest", /proc/net/rpc/racetest/channel) + an upcall
* feeder; userspace runs two concurrent readers and a
* FIONREAD ioctl loop against the shared cache_request so that
* cache_read()/cache_read()/cache_ioctl() race on rq->buf and
* rq->len (plain, unsynchronised accesses).
*
* Handshake with userspace (see scripts/init-rpcrace):
* /sys/module/rpcrace/parameters/event - readonly state machine
* /sys/module/rpcrace/parameters/helper_ready - write 1 to complete the
* window (mr03*); mr01/mr04 choreograph internally.
*/
#define pr_fmt(fmt) "RPCRACE: " fmt
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/kprobes.h>
#include <linux/kthread.h>
#include <linux/completion.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/in.h>
#include <linux/kref.h>
#include <linux/jiffies.h>
#include <linux/timer.h>
#include <linux/atomic.h>
#include <linux/sunrpc/clnt.h>
#include <linux/sunrpc/auth.h>
#include <linux/sunrpc/msg_prot.h>
#include <linux/sunrpc/rpc_pipe_fs.h>
#include <linux/sunrpc/cache.h>
#include <linux/sunrpc/xprt.h>
#include <linux/sunrpc/stats.h>
static char *mode = "mr03pfs";
static int hold_ms = 8000;
static int iters = 2;
static int stall_ms = 4000;
static int secs = 30;
static int auth_ok;
static unsigned long cb_addr;
static bool do_hold;
module_param(mode, charp, 0400);
module_param(hold_ms, int, 0400);
module_param(iters, int, 0400);
module_param(stall_ms, int, 0400);
module_param(secs, int, 0400);
module_param(auth_ok, int, 0400);
module_param(cb_addr, ulong, 0400);
MODULE_PARM_DESC(mode, "mr03pfs | mr03dbg | mr01 | mr04 | mr02");
MODULE_PARM_DESC(cb_addr, "runtime address of rpc_close_pipes (mr04)");
/* ------------------------------------------------------------------ */
/* state machine */
/* event==1 : A stalled / window open (helper may act) */
/* event==2 : B stalled (mr01: mount inside create_client_dir; */
/* mr04: umount inside simple_recursive_removal) */
/* event==3 : failing client freed / done */
/* ------------------------------------------------------------------ */
static atomic_t race_state = ATOMIC_INIT(0);
static DECLARE_COMPLETION(helper_compl);
static DECLARE_COMPLETION(go_compl);
static struct task_struct *worker;
static int kp_unreg_hit, kp_ccd_hit, kp_srr_hit;
/* ------------------------- fake rpc program ------------------------ */
static u32 race_counts[1];
static const struct rpc_procinfo race_procs[1] = { { 0 } };
static const struct rpc_version race_v1 = {
.number = 1,
.nrprocs = 1,
.procs = race_procs,
.counts = race_counts,
};
static const struct rpc_version *race_version[1] = { &race_v1 };
static struct rpc_stat race_stat;
static const struct rpc_program race_program = {
.name = "rpcrace",
.number = 200000,
.nrvers = 1,
.version = race_version,
.stats = &race_stat,
.pipe_dir_name = "nfs", /* exists in rpc_pipefs root */
};
/* ------------------------- fake rpc auth --------------------------- */
static void race_auth_destroy(struct rpc_auth *auth) { }
static struct rpc_auth race_fake_auth;
/*
* create() is called from rpcauth_create() inside rpc_client_register()
* (clnt.c L322) - i.e. AFTER the client was published to sn->all_clients
* (L318) and after the pipefs pipedir was created (L313-315). Holding this
* callback open holds the audited publication window open (mr03*).
*/
static struct rpc_auth *
race_auth_create(const struct rpc_auth_create_args *args, struct rpc_clnt *clnt)
{
if (auth_ok) {
refcount_set(&race_fake_auth.au_count, 1);
return &race_fake_auth;
}
if (do_hold) {
pr_info("window OPEN (hold_ms=%d), clnt=%p clid=%d\n",
hold_ms, clnt, clnt->cl_clid);
atomic_set(&race_state, 1);
wait_for_completion_timeout(&helper_compl,
msecs_to_jiffies(hold_ms));
}
return ERR_PTR(-EINVAL);
}
static const struct rpc_authops race_authops = {
.owner = THIS_MODULE,
.au_flavor = RPC_AUTH_KRB, /* 4, unregistered in-kernel */
.au_name = "rpcrace",
.create = race_auth_create,
.destroy = race_auth_destroy,
};
/* ------------------------- kprobe machinery ------------------------ */
static atomic_t arm = ATOMIC_INIT(0);
static atomic_t release_flag = ATOMIC_INIT(0);
static void spin_until(int target)
{
unsigned long until = jiffies + msecs_to_jiffies(stall_ms);
while (atomic_read(&race_state) < target && time_before(jiffies, until))
cpu_relax();
}
/* mr01 kp1: rpc_unregister_client entry on the failing-client thread */
static int mr01_kp_unreg_pre(struct kprobe *p, struct pt_regs *regs)
{
if (!atomic_read(&arm) || kp_unreg_hit || current != worker)
return 0;
kp_unreg_hit = 1;
atomic_set(&race_state, 1);
pr_info("kp1: failing thread stalled at err_auth unregister "
"(rpc_get_sb_net already returned NULL)\n");
spin_until(2);
pr_info("kp1: mount side stalled -> releasing failing thread\n");
return 0;
}
/* mr01 kp2: rpc_create_client_dir entry on the mount task */
static int mr01_kp_ccd_pre(struct kprobe *p, struct pt_regs *regs)
{
if (!atomic_read(&arm) || kp_ccd_hit || !kp_unreg_hit)
return 0;
if (strncmp(current->comm, "mount", 5) != 0)
return 0;
kp_ccd_hit = 1;
atomic_set(&race_state, 2);
pr_info("kp2: mount notifier stalled inside rpc_create_client_dir "
"(holds pipefs_sb_lock, clnt->pipefs_sb already written)\n");
spin_until(3);
pr_info("kp2: failing client freed -> resuming create_client_dir "
"on freed rpc_clnt\n");
return 0;
}
/* mr04 kp: simple_recursive_removal(dentry, callback==rpc_close_pipes) */
static int mr04_kp_srr_pre(struct kprobe *p, struct pt_regs *regs)
{
if (!atomic_read(&arm) || kp_srr_hit)
return 0;
#ifdef CONFIG_X86_64
if (!cb_addr || regs->si != cb_addr)
return 0;
#else
return 0;
#endif
if (strncmp(current->comm, "umount", 6) != 0)
return 0;
kp_srr_hit = 1;
atomic_set(&race_state, 2);
pr_info("kp: umount stalled inside simple_recursive_removal(pipe child)\n");
{
unsigned long until = jiffies + msecs_to_jiffies(stall_ms * 2);
while (!atomic_read(&release_flag) &&
time_before(jiffies, until))
cpu_relax();
}
pr_info("kp: switch-side removal done -> resuming removal on freed "
"pipe dentry\n");
return 0;
}
static struct kprobe kp_unreg = { .symbol_name = "rpc_unregister_client",
.pre_handler = mr01_kp_unreg_pre };
static struct kprobe kp_ccd = { .symbol_name = "rpc_create_client_dir",
.pre_handler = mr01_kp_ccd_pre };
static struct kprobe kp_srr = { .symbol_name = "simple_recursive_removal",
.pre_handler = mr04_kp_srr_pre };
/*
* mr04: the switch thread blocks on pipefs_sb_lock inside the re-register
* (the stalled umount holds the mutex), so the release is driven by a timer
* armed just before rpc_switch_client_transport(): the switch's unlocked
* __rpc_clnt_remove_pipedir() completes in microseconds, well within the
* 2s window; the umount thread then resumes on the freed pipe dentry.
*/
static struct timer_list mr04_rel_timer;
static void mr04_rel_timer_fn(struct timer_list *t)
{
atomic_set(&release_flag, 1);
pr_info("mr04: release timer fired\n");
}
/* ------------------------- client helpers -------------------------- */
static struct rpc_clnt *race_make_client(bool want_ok)
{
struct sockaddr_in sin = {
.sin_family = AF_INET,
.sin_addr.s_addr = htonl(INADDR_LOOPBACK),
.sin_port = htons(2049),
};
struct rpc_create_args args = {
.net = current->nsproxy->net_ns,
.protocol = XPRT_TRANSPORT_TCP,
.address = (struct sockaddr *)&sin,
.addrsize = sizeof(sin),
.servername = "racetest",
.program = &race_program,
.version = 0,
.authflavor = RPC_AUTH_KRB,
.cred = current_cred(),
.flags = RPC_CLNT_CREATE_NOPING,
};
auth_ok = want_ok ? 1 : 0;
return rpc_create(&args);
}
/* ------------------------- mr03 worker ----------------------------- */
static int mr03_threadfn(void *unused)
{
int i;
wait_for_completion(&go_compl);
for (i = 0; i < iters; i++) {
struct rpc_clnt *clnt;
reinit_completion(&helper_compl);
clnt = race_make_client(false);
if (!IS_ERR(clnt)) {
pr_err("unexpected success, aborting\n");
rpc_shutdown_client(clnt);
break;
}
pr_info("iteration %d: rpc_create failed (%ld); client freed "
"while file references were held\n", i, PTR_ERR(clnt));
atomic_set(&race_state, 3);
msleep(300);
}
atomic_set(&race_state, 3);
pr_info("mr03 done\n");
return 0;
}
/* ------------------------- mr01 worker ----------------------------- */
static int mr01_threadfn(void *unused)
{
struct rpc_clnt *clnt;
wait_for_completion(&go_compl);
kp_unreg_hit = 0;
kp_ccd_hit = 0;
/* pipefs must be unmounted at create time; kp1 stalls the err_auth
* unregister; the helper's concurrent mount stalls inside
* rpc_create_client_dir via kp2; release order reproduces the
* audited interleaving. */
atomic_set(&arm, 1);
clnt = race_make_client(false);
atomic_set(&arm, 0);
if (!IS_ERR(clnt)) {
pr_err("mr01: unexpected success\n");
rpc_shutdown_client(clnt);
} else {
pr_info("mr01: rpc_create failed (%ld)\n", PTR_ERR(clnt));
}
atomic_set(&race_state, 3);
return 0;
}
/* ------------------------- mr04 machinery -------------------------- */
struct race_pdo {
struct rpc_pipe_dir_object pdo;
struct rpc_pipe *pipe;
};
static struct rpc_clnt *mr04_clnt;
static struct race_pdo mr04_rp;
static ssize_t race_pipe_upcall(struct file *filp, struct rpc_pipe_msg *msg,
char __user *dst, size_t buflen)
{
return rpc_pipe_generic_upcall(filp, msg, dst, buflen);
}
static const struct rpc_pipe_ops race_pipe_ops = {
.upcall = race_pipe_upcall,
};
static int race_pdo_create(struct dentry *dir, struct rpc_pipe_dir_object *pdo)
{
struct race_pdo *rp = pdo->pdo_data;
return rpc_mkpipe_dentry(dir, "racetest", NULL, rp->pipe);
}
static void race_pdo_destroy(struct dentry *dir, struct rpc_pipe_dir_object *pdo)
{
struct race_pdo *rp = pdo->pdo_data;
rpc_unlink(rp->pipe);
}
static const struct rpc_pipe_dir_object_ops race_pdo_ops = {
.create = race_pdo_create,
.destroy = race_pdo_destroy,
};
static int mr04_setup(void)
{
int ret;
mr04_clnt = race_make_client(true); /* want_ok: fake valid auth */
if (IS_ERR(mr04_clnt))
return PTR_ERR(mr04_clnt);
mr04_rp.pipe = rpc_mkpipe_data(&race_pipe_ops, 0);
ret = PTR_ERR_OR_ZERO(mr04_rp.pipe);
if (ret)
goto out_clnt;
mr04_rp.pdo.pdo_data = &mr04_rp;
rpc_init_pipe_dir_object(&mr04_rp.pdo, &race_pdo_ops, &mr04_rp);
ret = rpc_add_pipe_dir_object(rpc_net_ns(mr04_clnt),
&mr04_clnt->cl_pipedir_objects,
&mr04_rp.pdo);
if (ret)
goto out_pipe;
pr_info("mr04: client clid=%d armed with pipedir + child pipe\n",
mr04_clnt->cl_clid);
return 0;
out_pipe:
rpc_destroy_pipe_data(mr04_rp.pipe);
out_clnt:
rpc_shutdown_client(mr04_clnt);
mr04_clnt = NULL;
return ret;
}
static void mr04_cleanup(void)
{
if (mr04_clnt)
rpc_shutdown_client(mr04_clnt);
mr04_clnt = NULL;
}
static int mr04_threadfn(void *unused)
{
struct sockaddr_in sin = {
.sin_family = AF_INET,
.sin_addr.s_addr = htonl(INADDR_LOOPBACK),
.sin_port = htons(2049),
};
struct xprt_create xargs = {
.ident = XPRT_TRANSPORT_TCP,
.net = rpc_net_ns(mr04_clnt),
.dstaddr = (struct sockaddr *)&sin,
.addrlen = sizeof(sin),
.servername = "racetest",
};
int ret, i;
/* wait for the umount thread to stall inside simple_recursive_removal */
{
unsigned long until = jiffies + msecs_to_jiffies(stall_ms * 4);
while (atomic_read(&race_state) < 2 &&
time_before(jiffies, until))
msleep(1);
}
if (atomic_read(&race_state) < 2) {
pr_err("mr04: umount side never stalled, aborting\n");
return 0;
}
pr_info("mr04: driving rpc_switch_client_transport() against the "
"stalled umount\n");
timer_setup(&mr04_rel_timer, mr04_rel_timer_fn, 0);
/* 300ms: the switch-side unlocked removal completes in microseconds,
* while the freed dentries are still inside the KASAN quarantine when
* the umount thread resumes (clean slab-use-after-free instead of a
* post-reuse crash). */
mod_timer(&mr04_rel_timer, jiffies + msecs_to_jiffies(300));
for (i = 0; i < 3; i++) {
ret = rpc_switch_client_transport(mr04_clnt, &xargs, NULL);
pr_info("mr04: switch attempt %d -> %d\n", i, ret);
if (ret == 0)
break;
msleep(50);
}
timer_delete_sync(&mr04_rel_timer);
atomic_set(&release_flag, 1);
atomic_set(&race_state, 3);
return 0;
}
/* ------------------------- mr02 machinery -------------------------- */
static struct cache_detail *race_cd;
static struct task_struct *feeder;
static bool feeder_run = true;
static void race_cache_put(struct kref *ref) { }
static void race_cache_request(struct cache_detail *cd, struct cache_head *h,
char **bpp, int *blen)
{
/* deterministic, comfortably-sized upcall text */
qword_add(bpp, blen, (char *)"racetest");
qword_add(bpp, blen, (char *)"filler-line-for-concurrent-formatting-race");
qword_add(bpp, blen, (char *)"0123456789012345678901234567890123456789");
qword_add(bpp, blen, (char *)"0123456789012345678901234567890123456789");
if (*blen > 0)
(*bpp)[-1] = '\n';
}
static struct cache_head *race_alloc(void)
{
return kzalloc_obj(struct cache_head, GFP_KERNEL);
}
static int race_match(struct cache_head *a, struct cache_head *b) { return 1; }
static void race_init_h(struct cache_head *a, struct cache_head *b) { }
static void race_update(struct cache_head *a, struct cache_head *b) { }
static struct cache_detail race_cd_template = {
.owner = THIS_MODULE,
.hash_size = 16,
.name = "racetest",
.cache_put = race_cache_put,
.cache_request = race_cache_request,
.alloc = race_alloc,
.match = race_match,
.init = race_init_h,
.update = race_update,
};
static int mr02_setup(void)
{
int ret;
race_cd = cache_create_net(&race_cd_template, current->nsproxy->net_ns);
if (IS_ERR(race_cd))
return PTR_ERR(race_cd);
ret = cache_register_net(race_cd, current->nsproxy->net_ns);
if (ret)
goto out_free;
pr_info("mr02: channel at /proc/net/rpc/racetest/channel\n");
return 0;
out_free:
cache_destroy_net(race_cd, current->nsproxy->net_ns);
race_cd = NULL;
return ret;
}
static void mr02_cleanup(void)
{
if (!race_cd)
return;
feeder_run = false;
if (feeder && !IS_ERR(feeder)) {
kthread_stop(feeder);
feeder = NULL;
}
cache_unregister_net(race_cd, current->nsproxy->net_ns);
cache_destroy_net(race_cd, current->nsproxy->net_ns);
race_cd = NULL;
}
static int mr02_threadfn(void *unused)
{
unsigned long until = jiffies + secs * HZ;
while (feeder_run && time_before(jiffies, until)) {
struct cache_head *h = race_alloc();
if (h) {
memset(h, 0, sizeof(*h));
INIT_HLIST_NODE(&h->cache_list);
kref_init(&h->ref);
h->expiry_time = seconds_since_boot() + 3600;
h->last_refresh = seconds_since_boot();
sunrpc_cache_upcall(race_cd, h);
/* h intentionally left pending: the rq stays on
* cd->requests for the readers to race on; the
* per-item leak is bounded by the run duration. */
}
usleep_range(1000, 2000);
}
pr_info("mr02: feeder done\n");
return 0;
}
/* ------------------------- module glue ----------------------------- */
static int helper_ready_get(char *buf, const struct kernel_param *kp)
{
return sprintf(buf, "%d\n", atomic_read(&race_state) >= 1 ? 1 : 0);
}
static int helper_ready_set(const char *val, const struct kernel_param *kp)
{
int v;
if (kstrtoint(val, 0, &v))
return -EINVAL;
if (v) {
pr_info("helper_ready -> window closing\n");
complete(&helper_compl);
}
return 0;
}
static const struct kernel_param_ops helper_ready_ops = {
.flags = KERNEL_PARAM_OPS_FL_NOARG,
.get = helper_ready_get,
.set = helper_ready_set,
};
module_param_cb(helper_ready, &helper_ready_ops, NULL, 0600);
static int event_get(char *buf, const struct kernel_param *kp)
{
return sprintf(buf, "%d\n", atomic_read(&race_state));
}
static const struct kernel_param_ops event_ops = {
.flags = KERNEL_PARAM_OPS_FL_NOARG,
.get = event_get,
};
module_param_cb(event, &event_ops, NULL, 0444);
static int __init rpcrace_init(void)
{
int ret;
do_hold = !strcmp(mode, "mr03pfs") || !strcmp(mode, "mr03dbg");
pr_info("mode=%s hold_ms=%d iters=%d stall_ms=%d secs=%d cb_addr=0x%llx\n",
mode, hold_ms, iters, stall_ms, secs, (unsigned long long)cb_addr);
if (!strcmp(mode, "mr03pfs") || !strcmp(mode, "mr03dbg")) {
ret = rpcauth_register(&race_authops);
if (ret)
return ret;
worker = kthread_run(mr03_threadfn, NULL, "rpcraceA");
ret = PTR_ERR_OR_ZERO(worker);
if (!ret)
complete(&go_compl);
return ret;
}
if (!strcmp(mode, "mr01")) {
ret = register_kprobe(&kp_unreg);
if (ret)
return ret;
ret = register_kprobe(&kp_ccd);
if (ret) {
unregister_kprobe(&kp_unreg);
return ret;
}
worker = kthread_run(mr01_threadfn, NULL, "rpcraceA");
ret = PTR_ERR_OR_ZERO(worker);
if (ret) {
unregister_kprobe(&kp_ccd);
unregister_kprobe(&kp_unreg);
return ret;
}
/* thread blocks on go_compl; release after worker assigned */
complete(&go_compl);
return 0;
}
if (!strcmp(mode, "mr04")) {
if (!cb_addr) {
pr_err("mr04 requires cb_addr=<rpc_close_pipes>\n");
return -EINVAL;
}
ret = rpcauth_register(&race_authops);
if (ret)
return ret;
ret = mr04_setup();
if (ret) {
rpcauth_unregister(&race_authops);
return ret;
}
ret = register_kprobe(&kp_srr);
if (ret) {
mr04_cleanup();
return ret;
}
atomic_set(&arm, 1);
worker = kthread_run(mr04_threadfn, NULL, "rpcraceA");
if (IS_ERR(worker)) {
unregister_kprobe(&kp_srr);
atomic_set(&arm, 0);
mr04_cleanup();
return PTR_ERR(worker);
}
return 0;
}
if (!strcmp(mode, "mr02")) {
ret = mr02_setup();
if (ret)
return ret;
feeder = kthread_run(mr02_threadfn, NULL, "rpcraceF");
if (IS_ERR(feeder)) {
mr02_cleanup();
return PTR_ERR(feeder);
}
return 0;
}
return -EINVAL;
}
static void __exit rpcrace_exit(void)
{
if (!strcmp(mode, "mr03pfs") || !strcmp(mode, "mr03dbg")) {
if (worker && !IS_ERR(worker))
kthread_stop(worker);
rpcauth_unregister(&race_authops);
} else if (!strcmp(mode, "mr01")) {
atomic_set(&arm, 0);
if (worker && !IS_ERR(worker))
kthread_stop(worker);
unregister_kprobe(&kp_ccd);
unregister_kprobe(&kp_unreg);
} else if (!strcmp(mode, "mr04")) {
atomic_set(&arm, 0);
atomic_set(&release_flag, 1);
if (worker && !IS_ERR(worker))
kthread_stop(worker);
unregister_kprobe(&kp_srr);
mr04_cleanup();
rpcauth_unregister(&race_authops);
} else if (!strcmp(mode, "mr02")) {
mr02_cleanup();
}
pr_info("exit\n");
}
module_init(rpcrace_init);
module_exit(rpcrace_exit);
MODULE_LICENSE("GPL");
next prev parent reply other threads:[~2026-11-26 12:49 UTC|newest]
Thread overview: 111+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-27 12:35 usb: devio: usbdev_release() has no barrier against an in-flight async_completed() callback (use-after-free window on struct usb_dev_state)gregkh@linuxfoundation.org 徐晗翔
2026-10-27 14:12 ` Greg KH
2026-11-03 11:21 ` mm/slub: has_pcs_used() reads remote per-CPU sheaf state from flush_all_cpus_locked() without synchronization (data race; KCSAN blind spot: slub.o is uninstrumented) 徐晗翔
2026-11-04 9:41 ` Qing Wang
2026-11-04 10:07 ` Qing Wang
2026-11-03 11:30 ` futex/hrtimer: hrtimer_sleeper::task is read unsynchronized in 16 places on v7.3 -- the accessor series that fixes this is not in 7.3; please make sure it reaches the affected trees (backport nudge + stock-kernel KCSAN evidence) 徐晗翔
2026-11-03 11:48 ` cgroup: fork vs cgroup.procs write race in favordynmods mode -- v7.3 is affected; please make sure bf6fbf46b5ff reaches the stable trees (repro incl. uninstrumented natural hit) 徐晗翔
2026-11-03 14:51 ` Sasha Levin
2026-11-03 11:57 ` net: rtnetlink: rtnl_link_unregister() vs in-flight RTM_GETLINK dump readers -- v7.3 lacks the synchronize_rcu() fix (Fixes: 6b57ff21a310 family); A/B reproduction on stock 7.3 徐晗翔
2026-11-03 15:49 ` Eric Dumazet
2026-11-04 15:03 ` Sasha Levin
2026-11-03 12:07 ` wifi: wilc1000: SDIO/SPI remove destroys the srcu_struct before wiphy_unregister() -- late cfg80211 callbacks write through dangling srcu state (unfixed upstream; controlled + natural Oops) 徐晗翔
2026-11-03 12:10 ` gpio: gpiolib: final put of the gpio_device happens inside the SRCU read critical section on the setup-failure path -- deterministic use-after-free read at guard release (unfixed upstream) 徐晗翔
2026-11-05 8:52 ` Linus Walleij
2026-11-04 12:54 ` soc: qcom: pmic_glink_altmode: fix use-after-free on unbind (no cancel_work_sync for port work and enable_work) 徐晗翔
2026-11-04 13:04 ` Greg KH
2026-11-04 12:57 ` usb: typec: anx7411: unregister partner/altmodes before stopping the IRQ work -- use-after-free, double unregister, orphan partner on remove 徐晗翔
2026-11-04 13:28 ` Greg KH
2026-11-04 12:58 ` usb: typec: ucsi: deadlock on cros_ec unbind -- connector lock held across cancel_delayed_work_sync vs the mode-selection work's unbounded trylock polling 徐晗翔
2026-11-04 13:00 ` usb: typec: stusb160x/rt1719/hd3ss3220: IRQ thread vs remove -- double unregister / use-after-free on the partner and port 徐晗翔
2026-11-04 13:01 ` usb: typec: ucsi: displayport: data race on dp->header/ vdo_data/vdo_size -- work reads them unlocked while writers hold con->lock (VDM mismatch) 徐晗翔
2026-11-04 13:02 ` usb: typec: class: three lifetime/locking gaps around the mux/switch handles and mode_selection (drvdata UAF after provider unbind; no concurrent protocol for set/put; unlocked state_update vs delete) 徐晗翔
2026-11-10 12:56 ` driver core: uevent: netns teardown frees uevent_sock while a tagged uevent is still being broadcast (UAF) 徐晗翔
2026-11-10 13:00 ` 徐晗翔
2026-11-10 18:48 ` Greg KH
2026-11-10 13:05 ` ACPI: CPPC: per-CPU cpc_desc is freed on processor unbind without clearing the published pointer, causing UAF in cpufreq accessors 徐晗翔
2026-11-10 13:07 ` ACPI: CPPC: shared PCC subspace data can be freed while another CPU probes, reads, or tears it down 徐晗翔
2026-11-10 14:47 ` Christian Loehle
2026-11-10 13:11 ` ACPI: ACPICA: Reset can delete an event semaphore while another thread is blocked in Wait 徐晗翔
2026-11-10 13:14 ` power: supply: bq25890: pump-express work can call power_supply_changed after the psy is unregistered 徐晗翔
2026-11-10 13:17 ` power: supply: core: get/set property callbacks can run after unregister and read freed driver data 徐晗翔
2026-11-10 13:18 ` power: supply: core: system-battery enumeration can return an unregistered battery 徐晗翔
2026-11-10 13:21 ` power: supply: core: changed work can run after unregister and use freed LED triggers 徐晗翔
2026-11-10 13:23 ` power: supply: bq24190: IRQ handler can call power_supply_changed after the psy is unregistered 徐晗翔
2026-11-10 13:34 ` 徐晗翔
2026-11-11 7:17 ` genirq: NMI dispatch reads struct irqaction with no quiescence -- use-after-free across free_nmi()'s kfree (x86 verification on the arch-independent core path) 徐晗翔
2026-11-11 7:26 ` genirq: NMI API lacks the request_mutex / dev_id matching / idempotency semantics that free_irq() has -- double free_nmi releases chip PM and module references twice (verified) 徐晗翔
2026-11-11 7:30 ` kernfs: kernfs_drain()'s fast-path decision reads the active count without acquire ordering -- on weakly-ordered architectures the forced ->release()/unmap can be skipped 徐晗翔
2026-11-11 13:41 ` Greg KH
2026-11-13 11:58 ` ALSA: ctxfi: free atimer only after the timer IRQ is quiesced 徐晗翔
2026-11-13 16:30 ` Takashi Iwai
2026-11-25 12:51 ` [PATCH] Re: " 徐晗翔
2026-11-25 14:33 ` Takashi Iwai
2026-11-13 12:03 ` ALSA: ctxfi: do not free a running system timer when timer_delete_sync_try() returns -1 (UAF) 徐晗翔
2026-11-25 12:51 ` [PATCH] " 徐晗翔
2026-11-25 14:35 ` Takashi Iwai
2026-11-26 2:13 ` 徐晗翔
2026-11-26 7:54 ` Takashi Iwai
2026-11-13 12:04 ` ALSA: asihpi: free IRQ before snd_card_free()/HPI delete on HPI6205 removal (UAF) 徐晗翔
2026-11-25 12:50 ` [PATCH] " 徐晗翔
2026-11-25 14:43 ` Takashi Iwai
2026-11-13 12:06 ` ALSA: asihpi: quiesce PCM timer and IRQ before freeing dpcm on close (UAF) 徐晗翔
2026-11-25 12:50 ` [PATCH] " 徐晗翔
2026-11-25 14:46 ` Takashi Iwai
2026-11-13 12:15 ` ALSA: pcm: link-group walk in timer callback can use a closed substream's freed runtime (UAF) 徐晗翔
2026-11-25 12:55 ` [PATCH] " 徐晗翔
2026-11-25 13:27 ` Takashi Iwai
2026-11-13 12:28 ` ALSA: usb-audio: us144mkii: PCM close frees runtime while playback/feedback URB completion and capture work still use it (UAF) 徐晗翔
2026-11-25 12:48 ` [PATCH] " 徐晗翔
2026-11-25 16:25 ` Takashi Iwai
2026-11-13 12:29 ` ALSA: usb-audio: us144mkii: queued stop_pcm_work calls snd_pcm_stop() after PCM close and dereferences NULL runtime 徐晗翔
2026-11-25 12:49 ` [PATCH] " 徐晗翔
2026-11-13 12:33 ` sched/topology: old domain chains are queued for RCU freeing before the per-CPU pointers are updated, so a late reader can still dereference a freed sched_domain and sched_domain_shared (UAF) 徐晗翔
2026-11-13 12:47 ` xfs: use-after-free in stats_clear sysctl handler during module unload 徐晗翔
2026-11-13 12:48 ` xfs: data races on xfs_params and xfs_globals tunables 徐晗翔
2026-11-17 12:32 ` jbd2: fix unsynchronized read of j_average_commit_time in procfs stats (KCSAN data race) 徐晗翔
2026-11-17 12:33 ` jbd2: read j_stats.ts_tid under j_history_lock in fast commit path " 徐晗翔
2026-11-17 12:35 ` jbd2: fix unlocked read/write of j_last_sync_writer in jbd2_journal_stop " 徐晗翔
2026-11-17 12:38 ` btrfs: compression: data race on compr_pool.count between shrinker scan and folio alloc/free " 徐晗翔
2026-11-17 12:47 ` fs/ceph: debugfs mdsmap_show() can dereference a freed MDS map after a concurrent map update (UAF) 徐晗翔
2026-11-17 12:48 ` fs/ceph: ceph_statfs() can dereference a freed MDS map (double evaluation of mdsc->mdsmap) (UAF) 徐晗翔
2026-11-17 12:49 ` fs/ceph: ceph_get_tree() out_splat path walks mdsc->mdsmap without mdsc->mutex (UAF) 徐晗翔
2026-11-17 12:50 ` fs/ceph: __ceph_setxattr() reads mdsmap->m_max_xattr_size " 徐晗翔
2026-11-17 12:51 ` fs/ceph: MDS reconnect paths read mdsc->mdsmap " 徐晗翔
2026-11-17 12:52 ` fs/ceph: caps renew paths read mdsmap->m_session_timeout " 徐晗翔
2026-11-24 14:53 ` Krzysztof Kozlowski
2026-11-17 12:53 ` fs/ceph: MDS connections can deliver CEPH_MSG_MDS_MAP and re-enter ceph_mdsc_handle_mdsmap() (UAF) 徐晗翔
2026-11-22 7:37 ` mm/hugetlb: a min_size-only hugetlbfs subpool is kfree()d before its last pinned page is released, so free_huge_folio() takes a spinlock on freed memory (UAF) 徐晗翔
2026-11-22 15:58 ` David Hildenbrand (Arm)
2026-11-25 12:05 ` David Hildenbrand (Arm)
2026-11-26 5:52 ` Ackerley Tng
2026-11-26 6:39 ` David Hildenbrand (Arm)
2026-11-22 7:39 ` io_uring/zcrx: copy statistics lose updates when one ifq is shared by multiple rings (Data race) 徐晗翔
2026-11-23 13:50 ` Pavel Begunkov
2026-11-24 17:17 ` Clément Léger
2026-11-22 7:43 ` sound: core: compress offload fd does not pin card or module, so card removal leaves a live fd pointing at freed snd_compr (KASAN UAF) 徐晗翔
2026-11-22 8:07 ` Takashi Iwai
2026-11-25 12:44 ` [PATCH] Re: " 徐晗翔
2026-11-25 14:21 ` Takashi Iwai
2026-11-22 7:48 ` sound: core: jack kcontrol is published before jack_kctl allocation, and the failure path frees it without removing it from card->controls (null-ptr-deref) 徐晗翔
2026-11-24 9:39 ` Sreeraj S Kurup
2026-11-25 12:43 ` 徐晗翔
2026-11-22 7:50 ` sound: core: rawmidi input close can re-queue event_work after cancel_work_sync() (UAF) 徐晗翔
2026-11-24 14:52 ` Krzysztof Kozlowski
2026-11-25 12:45 ` [PATCH] Re: " 徐晗翔
2026-11-25 14:37 ` Takashi Iwai
2026-11-22 7:52 ` sound: core: hwdep DSP_LOAD check-then-act is unlocked, allowing concurrent DSP_LOAD callbacks (UAF) 徐晗翔
2026-11-25 12:46 ` [PATCH] " 徐晗翔
2026-11-25 14:14 ` Takashi Iwai
2026-11-22 7:55 ` sound: core: get_available_index() calls snd_ctl_find_id() without controls_rwsem (UAF risk) 徐晗翔
2026-11-25 12:46 ` [PATCH] " 徐晗翔
2026-11-25 14:18 ` Takashi Iwai
2026-11-22 7:56 ` sound: core: OSS mixer notify callback is invoked without module pin or mutex, racing with rmmod 徐晗翔
2026-11-25 12:47 ` [PATCH] " 徐晗翔
2026-11-25 14:16 ` Takashi Iwai
2026-11-22 7:57 ` sound: timer: snd_utimer_fops lacks .owner, so an open user timer fd does not pin snd-timer 徐晗翔
2026-11-25 12:48 ` [PATCH] " 徐晗翔
2026-11-25 14:17 ` Takashi Iwai
2026-11-26 12:49 ` 徐晗翔 [this message]
2026-11-26 12:52 ` SUNRPC: cache_read() serialises readers with a per-open inode lock, but every open() gets a fresh inode: concurrent formatting of the shared upcall buffer and unsynchronised rq->len (Data Race KCSAN-confirmed) 徐晗翔
2026-11-26 12:55 ` SUNRPC: rpc_switch_client_transport() removes the client pipedir without pipefs_sb_lock, racing the RPC_PIPEFS_UMOUNT notification chain into a double removal (UAF) 徐晗翔
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=2806021d.13b2.1a217e7a409.Coremail.xuhx@hust.edu.cn \
--to=xuhx@hust.edu.cn \
--cc=anna@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=trondmy@kernel.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®