* [to-be-updated] taskstats-restrict-exit-listener-registration-to-init_net.patch removed from -mm tree
@ 2026-10-02 22:16 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2026-10-02 22:16 UTC (permalink / raw)
To: mm-commits, xu.xin, stable, bsingharora, tjdqudcks0424, akpm
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2540 bytes --]
The quilt patch titled
Subject: taskstats: restrict exit listener registration to init_net
has been removed from the -mm tree. Its filename was
taskstats-restrict-exit-listener-registration-to-init_net.patch
This patch was dropped because an updated version will be issued
------------------------------------------------------
From: 성병찬 <tjdqudcks0424@naver.com>
Subject: taskstats: restrict exit listener registration to init_net
Date: Fri, 2 Oct 2026 07:37:20 +0900
Taskstats exit listeners are stored globally per CPU as bare netlink port
IDs, while exit records are always sent through init_net. Since commit
edc73c7261ca ("kernel: make taskstats available from all net namespaces"),
a task in the initial user and PID namespaces can register a listener from
a child network namespace.
An unprivileged init_net socket can bind the same namespace-local port ID
and receive another UID task's complete exit record. Direct taskstats
queries and listener registration by that receiver remain denied with
EPERM.
Reject CPU-mask listener registration and deregistration outside init_net.
Keep PID and TGID queries available from non-initial network namespaces,
preserving the getdelays use case added by the cited commit.
AI-assisted source review helped identify this issue. The code path,
security boundary, and three reproductions on both v7.2.8 and current
mainline were manually verified in isolated QEMU guests.
Link: https://lore.kernel.org/20261001223721.458667-2-tjdqudcks0424@naver.com
Link: https://lore.kernel.org/all/20110630120831.GB7707@albatros/
Link: https://lore.kernel.org/all/87v8x678ph.fsf@email.froward.int.ebiederm.org/
Fixes: edc73c7261ca ("kernel: make taskstats available from all net namespaces")
Signed-off-by: 성병찬 <tjdqudcks0424@naver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Balbir Singh <balbirs@nvidia.com>
Cc: <bsingharora@gmail.com>
Cc: <xu.xin@linux.dev>
Cc: <stable@vger.kernel.org>
---
kernel/taskstats.c | 3 +++
1 file changed, 3 insertions(+)
--- a/kernel/taskstats.c~taskstats-restrict-exit-listener-registration-to-init_net
+++ a/kernel/taskstats.c
@@ -454,6 +454,9 @@ static int cmd_attr_cpumask(struct genl_
cpumask_var_t mask __free(free_cpumask_var) = CPUMASK_VAR_NULL;
int rc;
+ if (!net_eq(genl_info_net(info), &init_net))
+ return -EINVAL;
+
if (!alloc_cpumask_var(&mask, GFP_KERNEL))
return -ENOMEM;
rc = parse(info->attrs[attr], mask);
_
Patches currently in -mm which might be from tjdqudcks0424@naver.com are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-02 22:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-02 22:16 [to-be-updated] taskstats-restrict-exit-listener-registration-to-init_net.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.