]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
um: Fix PTRACE_POKEUSER on x86_64
authorRichard Weinberger <richard@nod.at>
Fri, 31 Mar 2017 22:41:57 +0000 (00:41 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 20 Jun 2017 08:50:19 +0000 (10:50 +0200)
commit9d78b0fddce2445be838076ab7bc36a69fea6a43
treee76a8ca1220b7f25913a5d470a87c6f48cad7cf7
parentbb20ba87b3d3188a55fc691a97d436667cff416e
um: Fix PTRACE_POKEUSER on x86_64

BugLink: http://bugs.launchpad.net/bugs/1692898
commit 9abc74a22d85ab29cef9896a2582a530da7e79bf upstream.

This is broken since ever but sadly nobody noticed.
Recent versions of GDB set DR_CONTROL unconditionally and
UML dies due to a heap corruption. It turns out that
the PTRACE_POKEUSER was copy&pasted from i386 and assumes
that addresses are 4 bytes long.

Fix that by using 8 as address size in the calculation.

Reported-by: jie cao <cj3054@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
arch/x86/um/ptrace_64.c