endbr64 is potentially neccessary in the syscall stubs.
authorderaadt <deraadt@openbsd.org>
Tue, 25 Apr 2023 04:11:10 +0000 (04:11 +0000)
committerderaadt <deraadt@openbsd.org>
Tue, 25 Apr 2023 04:11:10 +0000 (04:11 +0000)
libexec/ld.so/amd64/SYS.h

index ed1f207..0ac95d7 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: SYS.h,v 1.2 2023/01/11 01:55:17 mortimer Exp $        */
+/*     $OpenBSD: SYS.h,v 1.3 2023/04/25 04:11:10 deraadt Exp $ */
 
 /*
  * Copyright (c) 2002,2004 Dale Rahn
@@ -35,6 +35,7 @@
        .type   __CONCAT(_dl_,n), @function             ;\
        .align  16,0xcc                                 ;\
 __CONCAT(_dl_,n):                                      ;\
+       endbr64                                         ;\
        RETGUARD_SETUP(_dl_##n, r11)                    ;\
        RETGUARD_PUSH(r11)                              ;\
        movl    $(__CONCAT(SYS_,n)), %eax               ;\