Patch "arm64/ptrace: Reject attempts to set incomplete hardware breakpoint fields" has been added to the 4.4-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
arm64/ptrace: Reject attempts to set incomplete hardware breakpoint fields
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
arm64-ptrace-reject-attempts-to-set-incomplete-hardware-breakpoint-fields.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
ad9e202aa1ce571b1d7fed969d06f66067f8a086Mon Sep 17 00:00:00 2001
From: Dave Martin <[email protected]>
Date: Wed, 18 Jan 2017 16:25:24 +0000
Subject: arm64/ptrace: Reject attempts to set incomplete hardware breakpoint fields
From: Dave Martin <[email protected]>
commit ad9e202aa1ce571b1d7fed969d06f66067f8a086 upstream.
We cannot preserve partial fields for hardware breakpoints, because the values written by userspace to the hardware breakpoint registers can't subsequently be recovered intact from the hardware.
So, just reject attempts to write incomplete fields with -EINVAL.
--- arch/arm64/kernel/ptrace.c | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm64/kernel/ptrace.c +4 -0
@@ -450,6 +450,8 @@ static int hw_break_set(struct task_stru/* (address, ctrl) registers */ limit = regset->n * regset->size;while (count && offset < limit) { +if (count <PTRACE_HBP_ADDR_SZ ) +return -EINVAL ; ret =user_regset_copyin (&pos, &count, &kbuf, &ubuf, &addr, offset, offset +PTRACE_HBP_ADDR_SZ );if (ret)
@@ -459,6 +461,8 @@ static int hw_break_set(struct task_strureturn ret; offset +=PTRACE_HBP_ADDR_SZ ; +if (!count) +break ; ret =user_regset_copyin (&pos, &count, &kbuf, &ubuf, &ctrl, offset, offset +PTRACE_HBP_CTRL_SZ );if (ret)
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/arm64-ptrace-preserve-previous-registers-for-short-regset-write-3.patch queue-4.4/arm64-ptrace-reject-attempts-to-set-incomplete-hardware-breakpoint-fields.patch queue-4.4/arm64-ptrace-preserve-previous-registers-for-short-regset-write-2.patch queue-4.4/arm64-ptrace-avoid-uninitialised-struct-padding-in-fpr_set.patch queue-4.4/arm64-ptrace-preserve-previous-registers-for-short-regset-write.patch