diff options
author | 2020-10-18 14:28:16 +0000 | |
---|---|---|
committer | 2020-10-18 14:28:16 +0000 | |
commit | 13df69822c46036ceeeafb612b360459feebf6db (patch) | |
tree | 6a28bf76bfa5cd794a9aac4b2abf66b57bb16b42 /lib/libc/arch/i386/sys | |
parent | Fix typo. Spotted by patrick@ (diff) | |
download | wireguard-openbsd-13df69822c46036ceeeafb612b360459feebf6db.tar.xz wireguard-openbsd-13df69822c46036ceeeafb612b360459feebf6db.zip |
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/i386/sys')
-rw-r--r-- | lib/libc/arch/i386/sys/tfork_thread.S | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/arch/i386/sys/tfork_thread.S b/lib/libc/arch/i386/sys/tfork_thread.S index f1f82c30d5b..dfafb9139b6 100644 --- a/lib/libc/arch/i386/sys/tfork_thread.S +++ b/lib/libc/arch/i386/sys/tfork_thread.S @@ -1,4 +1,4 @@ -/* $OpenBSD: tfork_thread.S,v 1.9 2019/03/15 05:42:38 kevlo Exp $ */ +/* $OpenBSD: tfork_thread.S,v 1.10 2020/10/18 14:28:17 deraadt Exp $ */ /*- * Copyright (c) 2000 Peter Wemm <peter@FreeBSD.org> * All rights reserved. @@ -99,6 +99,7 @@ ENTRY(__tfork_thread) pushl $0 # slot for return address, ignored by kernel movl $SYS___threxit, %eax int $0x80 + int3 /* * Branch here if the thread creation fails: |