From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from second.openwall.net (second.openwall.net [193.110.157.125]) by inbox.vuxu.org (Postfix) with SMTP id 1D50425872 for ; Mon, 11 Mar 2024 19:23:25 +0100 (CET) Received: (qmail 22209 invoked by uid 550); 11 Mar 2024 18:19:15 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 22186 invoked from network); 11 Mar 2024 18:19:14 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1710181392; 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=dQ1cGUnqJgtRxlcw2dWMCnnKMI1Bef9mX+WIyTdwF1c=; b=bIiMTJl6lKTRVUbu0fjsp1CPW3I25Y3U+nNmOBvJOONS6n+3tcffR5KQNyTlQ1ILTEeo8P HyBWFPAmJ6AD6H70KR/GUeBokTSb+eHcf0Fld+5RreTLgexZyuiHY3ChuU22ibvQcGLi1i x9i1y4rc3idMZsHA23jk1J7MrSWEo14= X-MC-Unique: bEt9tNt-OsOXzKbqyXoHhg-1 From: Florian Weimer To: "Skyler Ferrante (RIT Student)" Cc: Andreas Schwab , Alejandro Colomar , Thorsten Glaser , Rich Felker , musl@lists.openwall.com, NRK , Guillem Jover , libc-alpha@sourceware.org, libbsd@lists.freedesktop.org, "Serge E. Hallyn" , Iker Pedrosa , Christian Brauner References: <20240309150258.GS4163@brightrain.aerifal.cx> <20240310193956.GU4163@brightrain.aerifal.cx> <20240310234410.GW4163@brightrain.aerifal.cx> Date: Mon, 11 Mar 2024 19:23:02 +0100 In-Reply-To: (Skyler Ferrante's message of "Mon, 11 Mar 2024 11:30:04 -0400") Message-ID: <875xxsljax.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.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain Subject: Re: [musl] Re: Tweaking the program name for functions * Skyler Ferrante: > Hmm, maybe I'm missing something, but it seems you can close(fd) for > the standard fds and then call execve, and the new process image will > have no fd 0,1,2. I've tried this on a default Ubuntu 22.04 system. > This seems to affect shadow-utils and other setuid/setgid binaries. > > Here is a repo I built for testing, > https://github.com/skyler-ferrante/fd_omission/. What is the correct > glibc behavior? Am I misunderstanding something? If you run it under strace, it's not running SUID (in AT_SECURE mode). I'm not saying we don't have bugs (although we do have some end-to-end AT_SECURE tests in the testsuite, but probably not for this legacy behavior), just that this approach to testing is questionable. Thanks, Florian