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_ADSP_CUSTOM_MED, 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 69F182B646 for ; Mon, 11 Mar 2024 21:39:47 +0100 (CET) Received: (qmail 32172 invoked by uid 550); 11 Mar 2024 20:35:37 -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 32152 invoked from network); 11 Mar 2024 20:35:36 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1710189574; x=1710794374; darn=lists.openwall.com; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=d4FrHmRZF5vculgUH3PY3Bfc5lwAiFlj4cCpZjcpoQM=; b=J9baLKogg5KVghhGRvVe4O2ldus9aPXq8jJ2KyIv08010ez3Mv0pOznA9fmY2KQg6/ jjJN3rauDi6/X+fBreGZcgxXExdzGBMsxkeyn0HfsaU9o+ErMogFmv2AuTnotlFOuBoy o6gM1FUBME+PbZAuZ2p2l5VCyeNr7ZSgdNIzC2LIoBrW4ByXdyziTRU82/57076SQkyg IitDJG18912Lb3OhDWAS5IuyiLS8sUVBqgk76IoQQaba7uIiFr3URoO81R66/72HG8pH I77/6oWt/Lk0qAauf+oWgOONgrqu6NIq9ljFyMrbD9/VOK5fLyJH6JsxtuSArHSR49Lj PmCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710189574; x=1710794374; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=d4FrHmRZF5vculgUH3PY3Bfc5lwAiFlj4cCpZjcpoQM=; b=es2E7TqtCdIY0efq9WPrMQSJJ4PCUkXblZVsrpMno76tieYzFWX+9AymLmlRZtQKUG NUgiStGcMnW2fCG6kdos/vBQ2vZyo7upWdk3VwfyPa1TrU3JobTq/hVG7RRSS4oM73+Z K6vNW4nhyVH6SonybjFXLNqja8mAohW/rejTeyooil3FIJmUIsv+9BVsl5ZZQYqcgNQT sQdTST96KAOttdw6BuPvtTBZNfcgF8530iEwYY86K178vtI49PmY9yp+lShYOQ0l68e8 fv5PKSnEu0/7GfIvWpy7Kwz5jMRJqBZbuw2FG1sEzM68zlPB+3FcSK5uSGAUW6U/S2EG +umQ== X-Forwarded-Encrypted: i=1; AJvYcCUlmMp4f7XjLoIZREraSST+5aHUdzmUp3fp0H8mB1YWLvN7az9yfCmrg2uIrgU3gOsX15nXiMnRtTJNpHpWM+x5X0QBK+E8fw== X-Gm-Message-State: AOJu0YxREmThvIGql3KNEKNNx7FinibUhEeFzlnUwN/BXbRpzsfqMF3l qzxMr5eBZWqqG4XKcpFBMmr7K0yryk1YkEQ9d8bM8cwNHgnP8pvLrLpPqKBmQgIsiSbLr2zJ1qr 3Pjw2QMGtcGYa7jAxjRGg73zD6YSMC1YtzABI X-Google-Smtp-Source: AGHT+IEE1zlTHBhfPnF6hFOhA1DkYYehiJpUO1GfIfOePwPMRUyFpaQ7a0KvrXGLpnKg2Rp8vuEI/8Gsrrodokbgs3o= X-Received: by 2002:a0c:ff29:0:b0:690:c7ec:9812 with SMTP id x9-20020a0cff29000000b00690c7ec9812mr5668004qvt.39.1710189574342; Mon, 11 Mar 2024 13:39:34 -0700 (PDT) MIME-Version: 1.0 References: <20240310193956.GU4163@brightrain.aerifal.cx> <20240310234410.GW4163@brightrain.aerifal.cx> <20240311194756.GY4163@brightrain.aerifal.cx> In-Reply-To: From: enh Date: Mon, 11 Mar 2024 13:39:22 -0700 Message-ID: To: sjf5462@rit.edu Cc: Rich Felker , Andreas Schwab , Alejandro Colomar , Thorsten Glaser , musl@lists.openwall.com, NRK , Guillem Jover , libc-alpha@sourceware.org, libbsd@lists.freedesktop.org, "Serge E. Hallyn" , Iker Pedrosa , Christian Brauner Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [musl] Re: Tweaking the program name for functions On Mon, Mar 11, 2024 at 1:09=E2=80=AFPM Skyler Ferrante (RIT Student) wrote: > > Yup, I agree. My confusion was from an incorrect assumption that > non-suid / suid programs would be handled the same way. I knew that > strace wouldn't keep it setuid by I didn't realize glibc only checked > closed fds for suid programs (which makes sense, this doesn't matter > for non-privileged programs). > > > application erroneously closes fd 2 > > And hopefully no program does that, and if it does, that's their fault :) programs get confused about fds and close the wrong ones all the time. the fd equivalent of a malloc() double-free especially. bionic has a fairly general protection against this class of error: https://android.googlesource.com/platform/bionic/+/master/docs/fdsan.md (fork() children do it on purpose all the time too :-) ) > Skyler