public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/2] sched: Fix dup_user_cpus_ptr() & do_set_cpus_allowed() bugs
@ 2022-12-22 22:49 Waiman Long
  2022-12-22 22:49 ` [PATCH v4 1/2] sched: Fix use-after-free bug in dup_user_cpus_ptr() Waiman Long
  2022-12-22 22:49 ` [PATCH v4 2/2] sched: Use kfree_rcu() in do_set_cpus_allowed() Waiman Long
  0 siblings, 2 replies; 3+ messages in thread
From: Waiman Long @ 2022-12-22 22:49 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
	Dietmar Eggemann, Steven Rostedt, Ben Segall, Mel Gorman,
	Daniel Bristot de Oliveira, Valentin Schneider
  Cc: Phil Auld, Wenjie Li, David Wang 王标, Quentin Perret,
	Will Deacon, linux-kernel, Waiman Long

 v4:
  - Make sure user_cpus_ptr allocation size is large enough for
    rcu_head.

This series fixes a UAF bug in dup_user_cpus_ptr() and uses kfree_rcu()
in do_set_cpus_allowed to avoid lockdep splats.

Waiman Long (2):
  sched: Fix use-after-free bug in dup_user_cpus_ptr()
  sched: Use kfree_rcu() in do_set_cpus_allowed()

 kernel/sched/core.c | 59 +++++++++++++++++++++++++++++++++++++++------
 1 file changed, 51 insertions(+), 8 deletions(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-12-22 22:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-22 22:49 [PATCH v4 0/2] sched: Fix dup_user_cpus_ptr() & do_set_cpus_allowed() bugs Waiman Long
2022-12-22 22:49 ` [PATCH v4 1/2] sched: Fix use-after-free bug in dup_user_cpus_ptr() Waiman Long
2022-12-22 22:49 ` [PATCH v4 2/2] sched: Use kfree_rcu() in do_set_cpus_allowed() Waiman Long

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox