Files
ubports_kernel_google_msm/kernel
Thomas Gleixner e8873fb76a futex: Validate atomic acquisition in futex_lock_pi_atomic()
CVE-2014-3153

commit b3eaa9fc5cd0a4d74b18f6b8dc617aeaf1873270 upstream.

We need to protect the atomic acquisition in the kernel against rogue
user space which sets the user space futex to 0, so the kernel side
acquisition succeeds while there is existing state in the kernel
associated to the real owner.

Verify whether the futex has waiters associated with kernel state.  If
it has, return -EINVAL.  The state is corrupted already, so no point in
cleaning it up.  Subsequent calls will fail as well.  Not our problem.

[ tglx: Use futex_top_waiter() and explain why we do not need to try
  	restoring the already corrupted user space state. ]

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Will Drewry <wad@chromium.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
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:43 -06:00
..
2013-09-09 17:01:42 -07:00
2013-04-18 16:08:19 -07:00
2012-04-09 13:57:52 -07: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
2014-06-26 12:52:23 -06:00
2012-03-15 18:17:55 -07:00