lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <5660A08B.6030204@ccur.com>
Date:	Thu, 3 Dec 2015 14:05:31 -0600
From:	John Blackwood <john.blackwood@...r.com>
To:	Will Deacon <will.deacon@....com>
CC:	<linux-kernel@...r.kernel.org>
Subject: [PATCH] ARM64: Clear out any singlestep state on a ptrace detach
 operation

Hello Will,

I have a patch for a ptrace(2) issue that we encountered on arm64 kernels.
If a debugger singlesteps a ptraced task, and then does a ptrace(2)
PTRACE_DETACH command, the task will not resume successfully. It seems
that clearing out the singlestep state, as something like a ptrace(2)
PTRACE_CONT does, gets this working.

Thank you for your time and considerations.

----- -----

arm64: Clear out any singlestep state on a ptrace detach operation.

Make sure to clear out any ptrace singlestep state when a
ptrace(2) PTRACE_DETACH call is made on arm64 systems.

Otherwise, the previously ptraced task will die off with a SIGTRAP signal
if the debugger just previously singlestepped the ptraced task.

Signed-off-by: John Blackwood <john.blackwood@...r.com>

Index: b/arch/arm64/kernel/ptrace.c
===================================================================
--- a/arch/arm64/kernel/ptrace.c
+++ b/arch/arm64/kernel/ptrace.c
@@ -58,6 +58,7 @@
   */
  void ptrace_disable(struct task_struct *child)
  {
+	user_disable_single_step(child);
  }
  
  #ifdef CONFIG_HAVE_HW_BREAKPOINT
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ