This repository has been archived on 2026-03-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
ubports_kernel_google_msm/kernel
Darren Hart 5db6240f7e futex: avoid wake_futex() for a PI futex_q
CVE-2014-3153

commit aa10990e028cac3d5e255711fb9fb47e00700e35 upstream.

Dave Jones reported a bug with futex_lock_pi() that his trinity test
exposed.  Sometime between queue_me() and taking the q.lock_ptr, the
lock_ptr became NULL, resulting in a crash.

While futex_wake() is careful to not call wake_futex() on futex_q's with
a pi_state or an rt_waiter (which are either waiting for a
futex_unlock_pi() or a PI futex_requeue()), futex_wake_op() and
futex_requeue() do not perform the same test.

Update futex_wake_op() and futex_requeue() to test for q.pi_state and
q.rt_waiter and abort with -EINVAL if detected.  To ensure any future
breakage is caught, add a WARN() to wake_futex() if the same condition
is true.

This fix has seen 3 hours of testing with "trinity -c futex" on an
x86_64 VM with 4 CPUS.

[akpm@linux-foundation.org: tidy up the WARN()]
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Reported-by: Dave Jones <davej@redat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: John Kacur <jkacur@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
2014-06-27 08:15:42 -06:00
..
2011-07-26 16:49:45 -07:00
2013-09-09 17:01:42 -07:00
2013-04-18 16:08:19 -07:00
2011-03-14 09:15:23 -04:00
2011-09-23 12:05:29 +05:30
2012-04-09 13:57:52 -07:00
2011-07-14 12:59:14 +03:00
2012-03-28 18:30:03 +01:00
2012-03-26 12:50:53 +10:30
2012-03-29 19:52:46 +08:00
2012-03-28 18:30:03 +01:00
2011-10-31 17:30:44 -07:00
2014-06-26 12:52:23 -06:00
2011-09-19 17:04:37 -07:00
2012-03-15 18:17:55 -07:00