NetBSD Problem Report #57511

From www@netbsd.org  Fri Jul  7 08:17:57 2023
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 9F5421A923D
	for <gnats-bugs@gnats.NetBSD.org>; Fri,  7 Jul 2023 08:17:57 +0000 (UTC)
Message-Id: <20230707081756.18F281A923E@mollari.NetBSD.org>
Date: Fri,  7 Jul 2023 08:17:56 +0000 (UTC)
From: rokuyama.rk@gmail.com
Reply-To: rokuyama.rk@gmail.com
To: gnats-bugs@NetBSD.org
Subject: ld.elf_so(1) does not support secure PLT for alpha
X-Send-Pr-Version: www-1.0

>Number:         57511
>Category:       port-alpha
>Synopsis:       ld.elf_so(1) does not support secure PLT for alpha
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-alpha-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 07 08:20:00 +0000 2023
>Last-Modified:  Thu Aug 17 07:45:01 +0000 2023
>Originator:     Rin Okuyama
>Release:        10.99.4
>Organization:
Internet Initiative Japan Inc.
>Environment:
NetBSD ds10 10.99.4 NetBSD 10.99.4 (GENERIC-$Revision: 1.418 $) #6: Wed Jun 28 19:19:37 JST 2023 rin@latipes:/home/rin/repos/src/sys/arch/alpha/compile/DS10 alpha
>Description:
Dynamic-linked binaries for alpha built with binutils 2.39 crash
due to SIGSEGV in __start, trying to jump into NULL.

This is worked around by forcibly disabling secure PLT option,
introduced by binutils 2.39 for us.

With this option, write permission to .plt section is dropped,
and we need to parse GOT differently as before, see
``if (elf64_alpha_use_secureplt)'' blocks in
external/gpl3/binutils/dist/bfd/elf64-alpha.c.

Also note that there is no official System V (or ELF) ABI
definitions published for alpha.
>How-To-Repeat:
Try to run any dynamically-linked binaries generated by binutils
2.39 on alpha. Then, it will crash due to SIGSEGV.
>Fix:
Add support for secure PLT for ld.elf_so(1) on alpha.

>Audit-Trail:
From: "Rin Okuyama" <rin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57511 CVS commit: src/external/gpl3/binutils/dist/bfd
Date: Fri, 7 Jul 2023 08:33:25 +0000

 Module Name:	src
 Committed By:	rin
 Date:		Fri Jul  7 08:33:25 UTC 2023

 Modified Files:
 	src/external/gpl3/binutils/dist/bfd: elf64-alpha.c

 Log Message:
 PR port-alpha/57511 Temporally disable secure PLT for alpha
 until support is added to ld.elf_so(1).


 To generate a diff of this commit:
 cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/binutils/dist/bfd/elf64-alpha.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Rin Okuyama" <rin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57511 CVS commit: src/doc
Date: Fri, 7 Jul 2023 08:39:24 +0000

 Module Name:	src
 Committed By:	rin
 Date:		Fri Jul  7 08:39:24 UTC 2023

 Modified Files:
 	src/doc: HACKS

 Log Message:
 doc/HACKS: Document PR port-alpha/57511


 To generate a diff of this commit:
 cvs rdiff -u -r1.236 -r1.237 src/doc/HACKS

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Rin Okuyama" <rin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/57511 CVS commit: src/external/gpl3/gdb/dist/bfd
Date: Thu, 17 Aug 2023 07:40:20 +0000

 Module Name:	src
 Committed By:	rin
 Date:		Thu Aug 17 07:40:20 UTC 2023

 Modified Files:
 	src/external/gpl3/gdb/dist/bfd: configure

 Log Message:
 gdb/bfd: Disable secure PLT for NetBSD/alpha, lost during merge

 Until our ld.elf_so supports it, see PR port-alpha/57511

 This does not affect platforms other than alpha.

 XXX
 mknative later


 To generate a diff of this commit:
 cvs rdiff -u -r1.16 -r1.17 src/external/gpl3/gdb/dist/bfd/configure

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2023 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.