From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id C17A2385AC25 for ; Tue, 12 Dec 2023 10:11:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C17A2385AC25 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C17A2385AC25 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702375892; cv=none; b=Lk3n20+Ia944MorGjrIQlpBwdd12n0NVVJsNjecHuWsiifp79zwoRwCRVYjX8nAMSt1rRIw6D5rWCdi7YJZeYzJW+J/LqCZeIOD5dqCEN83JLhjWx0Q5gFatl0aqKs84m6O4OyQXfLHsXevY7YNHsfl2fno4WPsEkiwpZTO5tR4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702375892; c=relaxed/simple; bh=SqMD18jXcgpVgf0vTV70vE5p+tOQdYFcwIQLE1j0akA=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=hqO1yT9Ca67pTiOqHJW6CfSh8tZ+g48ex/C5mCXtQRngGVt9hXZb4ZV1AChC6nFw9UjQN1UOyuu9MjG+3Ekms0UPxBuvTBjwSqJI+3mejZVAaU/rEb2lphj+SBYEY2y6Kc/InOUV8Szr7/y4vRPQxR01rpxBKD+Pybu2JOCuT6U= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702375890; 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: in-reply-to:in-reply-to:references:references; bh=UOEh83Hjtv5jcONY/OW3+NQF2QbaUg3ixHAdG3158Rg=; b=IFXytrELcZcbyGAy0k7hct4ahnPHmPSq23cH7GmBo6e+6oFCnW/ToDI25NJMuavIidaNi7 XxeyVbr+2GQ20Wt2y+C2TqC1c9ObXcPRU6LkIMUWlP0cRt3N7lTT19Iwj8H6MJQBAdSka/ 5BOhZEz0VE4l4u8TyL+CvJ3kA+xrz44= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-225-tkYTfwBHNYK4lykkzRkXgg-1; Tue, 12 Dec 2023 05:11:27 -0500 X-MC-Unique: tkYTfwBHNYK4lykkzRkXgg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B0FC9101CC60; Tue, 12 Dec 2023 10:11:26 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.192.100]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 944632166B31; Tue, 12 Dec 2023 10:11:25 +0000 (UTC) From: Florian Weimer To: Siddhesh Poyarekar Cc: Adhemerval Zanella , libc-alpha@sourceware.org, Carlos O'Donell Subject: Re: [PATCH v2 12/19] elf: Ignore LD_PROFILE for setuid binaries References: <20231017130526.2216827-1-adhemerval.zanella@linaro.org> <20231017130526.2216827-13-adhemerval.zanella@linaro.org> <62221ac7-40fc-4196-8fa0-b75ea0d201ce@sourceware.org> Date: Tue, 12 Dec 2023 11:11:23 +0100 In-Reply-To: <62221ac7-40fc-4196-8fa0-b75ea0d201ce@sourceware.org> (Siddhesh Poyarekar's message of "Fri, 27 Oct 2023 10:25:06 -0400") Message-ID: <87r0jrlohg.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_SHORT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE 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: * Siddhesh Poyarekar: > On 2023-10-17 09:05, Adhemerval Zanella wrote: >> Loader does not ignore LD_PROFILE in secure-execution mode (different >> than man-page states [1]), rather it uses a different path >> (/var/profile) and ignore LD_PROFILE_OUTPUT. >> Allowing secure-execution profiling is already a non good security >> boundary, since it enables different code paths and extra OS access by >> the process. But by ignoring LD_PROFILE_OUTPUT, the resulting profile >> file might also be acceded in a racy manner since the file name does not >> use any process-specific information (such as pid, timing, etc.). >> Another side-effect is it forces lazy binding even on libraries that >> might be with DF_BIND_NOW. >> [1] https://man7.org/linux/man-pages/man8/ld.so.8.html >> --- > > I tend to agree. Carlos, Florian, is profiling of setuid binaries > something that needs to be supported as compatibility behaviour? I'm > inclined to agree with Adhemerval and just rip it out. It's not something we need to support. LD_PROFILE does not seem to be regularly used for profiling anyway. Thanks, Florian