日期范围
52
Bugfix讨论数
Bugfix重要分析 success作者:Tim Chen2026/09/02 08:043 封邮件

[PATCH 0/2] sched/cache: Fix use after free mm access in account_mm_sched()

把 sched_cache_stat 从 mm_struct 抽成独立的 refcount+RCU 对象 sched_cache_group,再让 task_struct 持有自己的引用。调度路径改读 p->sched_cache_grp,mm 被销毁后 grp 仍可由后续读者安全访问,彻底消除 account_mm_sched() / task_cache_work() 在 rq lock 下读 p->mm->sc_stat 的 UAF 窗口。两个 patch 必须配对 cherry-pick,单应用 patch 1 仍会复现 race。

lore
Bugfix重要分析 success作者:Hyunwoo Kim2026/09/02 04:499 封邮件

[PATCH] sched/cache: Fix use-after-free of the mm replaced by exec

该 patch 修复 sched/cache(cache-aware load balancing)在 execve 切换 mm 时与远端 CPU 上 account_mm_sched() 的并发 UAF。做法是在 exec_mm_put_old() 释放旧 mm 之前,对当前 task 自身的 rq 锁做一次 acquire/release,让所有还在用旧 mm 的 reader 在同一把锁下排空。讨论中 Tim Chen 提议顺带合并他把 sc_stat 与 sched_group 解耦、用 call_rcu 释放的更大系列,被 Chen Yu 认同为更彻底的长期方案。

lore
Bugfix重要分析 success作者:Hyunwoo Kim2026/09/01 05:331 封邮件

[PATCH v2] sched/cache: Fix use-after-free of the mm replaced by exec

当 execve() 同时改写 tsk->mm 与 tsk->active_mm 并释放 old_mm 时,另一颗 CPU 持 rq lock 且 preemption-disabled 的 account_mm_sched() 仍是 RCU 读侧临界区里的 reader,旧 mm 被先释放就会引发 UAF。补丁在 exec_mm_put_old() 释放前插入 synchronize_rcu() 等一个 RCU 宽限期,从而保证旧 mm 上的所有引用安全退出。这是 v2,相比 v1 改用 synchronize_rcu() 替代刷 rq lock,覆盖所有 preempt-disabled ...

lore
Bugfix重要分析 success作者:Aaron Tomlin2026/08/28 06:187 封邮件

[PATCH v9 0/6] Introduce per-CPU debugfs files

Aaron Tomlin 发布 v9 系列共 6 个补丁,修复 /sys/kernel/debug/sched/debug 中 print_dl_rq/print_cpu/sched_show_numa/print_cfs_stats 几处的 use-after-free、TOCTOU 与 RCU 遍历违例;引入 rcu_dereference_root_domain() 宏与 for_each_leaf_cfs_rq_rcu() 迭代器,并用 SCHED_DEBUG_MAX_ITER=4096 熔断防 RCU stall。最后一个补丁新增 /sys/kernel/debug/sched/cp...

lore
Bugfix重要分析 success作者:Aaron Tomlin2026/08/28 04:378 封邮件

[PATCH v8 1/6] sched: Annotate rq->rd with __rcu and update lockless readers

Aaron Tomlin v8 系列给 struct rq 的 rd 指针加上 __rcu 标注并新增 rcu_dereference_root_domain() 辅助宏,把 print_dl_rq()/print_cpu()/sched_show_numa()/print_cfs_stats() 四处锁外裸读全部纳入 RCU 或 task_lock 保护,避免 CPU 热拔出、cgroup cpuset 重划分或任务退出并发路径下的 use-after-free、TOCTOU 与 RCU CPU stall。最后一片新增 /sys/kernel/debug/sched/cpu/cpu<N>/...

lore
每页
上一页8 / 11下一页