mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v5 0/2] sched: Fix dup_user_cpus_ptr() & do_set_cpus_allowed() bugs
@ 2022-12-30 15:32 Waiman Long
  2022-12-30 15:32 ` [PATCH v5 1/2] sched: Fix use-after-free bug in dup_user_cpus_ptr() Waiman Long
  2022-12-30 15:32 ` [PATCH v5 2/2] sched: Use kfree_rcu() in do_set_cpus_allowed() Waiman Long
  0 siblings, 2 replies; 7+ messages in thread
From: Waiman Long @ 2022-12-30 15:32 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

 v5:
  - Add an alloc_user_cpus_ptr() helper and use it in patch 2.

 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 | 58 +++++++++++++++++++++++++++++++++++++++------
 1 file changed, 51 insertions(+), 7 deletions(-)

-- 
2.31.1


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

end of thread, other threads:[~2022-12-31  1:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-30 15:32 [PATCH v5 0/2] sched: Fix dup_user_cpus_ptr() & do_set_cpus_allowed() bugs Waiman Long
2022-12-30 15:32 ` [PATCH v5 1/2] sched: Fix use-after-free bug in dup_user_cpus_ptr() Waiman Long
2022-12-30 15:32 ` [PATCH v5 2/2] sched: Use kfree_rcu() in do_set_cpus_allowed() Waiman Long
2022-12-30 17:21   ` kernel test robot
2022-12-30 20:12   ` kernel test robot
2022-12-30 21:53   ` kernel test robot
2022-12-31  1:15   ` kernel test robot

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®