From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-4.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 506191F4B5 for ; Tue, 19 Nov 2019 08:21:03 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :mime-version:content-type:content-transfer-encoding; q=dns; s= default; b=kC80HYYO5FJ9I+QEWS5jBil5IAe/iC1yHeKIAxQuG9im52GUMHuVf LtqL8uve4CWULbmqiHilboeI9DY7R8yiovr59tZbvBk346LHUSHkHR46nrCuZ8O1 nozgoNqa4XkrQV2K062+hMWwTxHJtfawB4MAHDowSRSDZ+p2YV4Kns= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id :mime-version:content-type:content-transfer-encoding; s=default; bh=6Pm3wkq7E2du8+IsOWt/pMTOow0=; b=T0VsqUnX5VLi2KSK4X+7I77C/te1 EB3hwURHZyj1ROM13y0gdAnhSlXDpOv0DUAj1BU76dq7ErYUd/LrXDM1c/6WFOQ9 UfFiAtowNwX4IKu2s8CXx2OWw2g34cMI1gz6ldGTEAReSbVQQGFRQDjwk4m+RHUE nMRObXHE5jzJM+o= Received: (qmail 41600 invoked by alias); 19 Nov 2019 08:21:00 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 41580 invoked by uid 89); 19 Nov 2019 08:21:00 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: xyzzy.0x04.net From: =?UTF-8?q?Marcin=20Ko=C5=9Bcielnicki?= To: libc-alpha@sourceware.org Cc: =?UTF-8?q?Marcin=20Ko=C5=9Bcielnicki?= Subject: [PATCH] rtld: Check __libc_enable_secure before honoring LD_PREFER_MAP_32BIT_EXEC Date: Tue, 19 Nov 2019 09:20:37 +0100 Message-Id: <20191119082037.31356-1-koriakin@0x04.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Marcin Koƛcielnicki Fixes #25204. --- sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h b/sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h index 0e95221908..e3af239faa 100644 --- a/sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h +++ b/sysdeps/unix/sysv/linux/x86_64/64/dl-librecon.h @@ -31,7 +31,8 @@ environment variable, LD_PREFER_MAP_32BIT_EXEC. */ #define EXTRA_LD_ENVVARS \ case 21: \ - if (memcmp (envline, "PREFER_MAP_32BIT_EXEC", 21) == 0) \ + if (!__libc_enable_secure \ + && memcmp (envline, "PREFER_MAP_32BIT_EXEC", 21) == 0) \ GLRO(dl_x86_cpu_features).feature[index_arch_Prefer_MAP_32BIT_EXEC] \ |= bit_arch_Prefer_MAP_32BIT_EXEC; \ break; -- 2.23.0