From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from heron.birch.relay.mailchannels.net (heron.birch.relay.mailchannels.net [23.83.209.82]) by sourceware.org (Postfix) with ESMTPS id EC657384DD3E for ; Thu, 5 Oct 2023 14:06:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EC657384DD3E Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=sourceware.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=sourceware.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 7E6B47618BA; Thu, 5 Oct 2023 14:06:00 +0000 (UTC) Received: from pdx1-sub0-mail-a312.dreamhost.com (unknown [127.0.0.6]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id EDB2A7616C0; Thu, 5 Oct 2023 14:05:59 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1696514760; a=rsa-sha256; cv=none; b=Ozy31SbIs0l3OfQvUKOlpDo0nVjHtv1hRTqTN2nZ4dWlYZHphSlg6fy7HNTVCKQFuJvKMa MV5Y7x0hQH1dSH0XGguOT6piFrf60Xyy0FIBy7oMlGSJb7DXtZnrqJqUlOzqt7vTTjTgz3 IyrAgSDgTZ4LR2RsQOdD0ZPpjk70U5LjhiKoIpAYjGlzngbgJ5MwKCre0D9ERJir6vVze/ D2fn8tHNbPJYadi2XcRF6jArKpSjzIcM22g49lACwa1Z3KmmaWizbvES+crYsdVOkeocnL erlC/Qo/2TtMT4LUkpvbbuWNdD43Dy9uexIsRdGAxhECpE3lBgrzuwxxHtTUFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1696514760; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HyonB7zHEprnofqt6Xz0BgK9XYZo+71pvKqWBua6djY=; b=wp39jHrPIS6egPhLNgd+UV8LrgdLMdnWrvp09d/9lUg9hZJLRRcaT/iXT1A47f2dvkarfE BRGih3Fpm2bVhGW/+rrwsE6RYB/C/41QlycPSDBl6575fPFiSuZdxRHHXlfDTodJb10M/H HKSctmIn5LLDg5jIGf0vvytX0N3+J9k8yJUbj3dWlw2Nx0v7myB+ZVKLeDWY2orv67HVW3 BfkLb4T1kmBDj1ij75U4CaDzgNXdHc5FaH3M/U692BadUfo0/yuuUa/fUxkHuUbhsTxavZ WQT3yRXHQZjBB6A/xql14wnPrnMpbzB7tQauu+P3v9mT3SB/HALpYfng1rRt1A== ARC-Authentication-Results: i=1; rspamd-7c449d4847-7frzf; auth=pass smtp.auth=dreamhost smtp.mailfrom=siddhesh@sourceware.org X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Relation-Tasty: 2b1a24636fdcf0ab_1696514760367_1977249618 X-MC-Loop-Signature: 1696514760367:3388314980 X-MC-Ingress-Time: 1696514760367 Received: from pdx1-sub0-mail-a312.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.97.162.150 (trex/6.9.1); Thu, 05 Oct 2023 14:06:00 +0000 Received: from [192.168.2.12] (bras-vprn-toroon4834w-lp130-02-142-113-138-41.dsl.bell.ca [142.113.138.41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a312.dreamhost.com (Postfix) with ESMTPSA id 4S1YHq37htz4G; Thu, 5 Oct 2023 07:05:59 -0700 (PDT) Message-ID: Date: Thu, 5 Oct 2023 10:05:58 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH 2/2] aarch64: Make glibc.mem.tagging SXID_ERASE Content-Language: en-US To: Szabolcs Nagy , Adhemerval Zanella Netto , libc-alpha@sourceware.org Cc: fweimer@redhat.com, carlos@redhat.com References: From: Siddhesh Poyarekar In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1168.5 required=5.0 tests=BAYES_00,KAM_DMARC_NONE,KAM_DMARC_STATUS,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_SOFTFAIL,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2023-10-05 09:59, Szabolcs Nagy wrote: > The 10/05/2023 08:55, Siddhesh Poyarekar wrote: >> On 2023-10-05 04:19, Szabolcs Nagy wrote: >>> i'd fix this in one place that makes the behaviour easy >>> to reason about: _dl_next_ld_env_entry in rtld should >>> just return empty in secure mode and same for getenv, >>> internally it should return empty. >>> >>> then we know that nothing in libc can depend on the env. >>> (if something parses env directly that should be fixed) >>> >>> if anything, there should be a whitelist, not blacklist >>> of env vars. >> >> That won't work because it would require knowledge of (or a mechanism to >> specify) safety of environment variables used by the application and its >> children. The current unsecvars approach is probably the best option. > > why would you need a whitelist of application envvars? > > if there is any env var usage *in libc* that is valid to > affect setuid binaries then those should be whitelisted. > (black list works too, but more error prone in imo) So do you mean (1) maintain a full list of envvars recognized by glibc and then (2) designate specific ones as safe? That would be a good idea. Sid