summaryrefslogtreecommitdiff
path: root/lib/libc/arch/amd64
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2020-10-18 14:28:19 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2020-10-18 14:28:19 +0000
commit81a42b0abcdedc2a5538a98fa140b5c905c37f13 (patch)
tree13de44cacdce2db993f272ce7e0db0df213b0388 /lib/libc/arch/amd64
parent81c0077baa3d0d74d74a14320f14425416016856 (diff)
SYS___threxit cannot fail, but this integration looks like a gadget.
Put a hard-trap instruction after the syscall instruction. ok kettenis mortimer
Diffstat (limited to 'lib/libc/arch/amd64')
-rw-r--r--lib/libc/arch/amd64/sys/tfork_thread.S3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/arch/amd64/sys/tfork_thread.S b/lib/libc/arch/amd64/sys/tfork_thread.S
index 647f070cbcc..b543296b04e 100644
--- a/lib/libc/arch/amd64/sys/tfork_thread.S
+++ b/lib/libc/arch/amd64/sys/tfork_thread.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: tfork_thread.S,v 1.9 2020/10/01 01:05:40 guenther Exp $ */
+/* $OpenBSD: tfork_thread.S,v 1.10 2020/10/18 14:28:17 deraadt Exp $ */
/*-
* Copyright (c) 2000 Peter Wemm <peter@FreeBSD.org>
* Copyright (c) 2003 Alan L. Cox <alc@cs.rice.edu>
@@ -89,6 +89,7 @@ ENTRY(__tfork_thread)
movl $SYS___threxit, %eax
xorl %edi, %edi
syscall
+ int3
/*
* Branch here if the thread creation fails: