Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp3314434ybk; Tue, 19 May 2020 01:15:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWhAx9917ARoLHkq7KNLGZJ+l+bxZCFJg+4Q0KPG0wTGJyKgdZMsSbw82HGdqPWL/UCESy X-Received: by 2002:a17:906:6843:: with SMTP id a3mr18365596ejs.245.1589876157814; Tue, 19 May 2020 01:15:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589876157; cv=none; d=google.com; s=arc-20160816; b=uWtsIsVTynaCeGKP8PQVinzhwVA+1s3KQzNVdaTMQ692iKnAjEZYI7IcEKq+VDhQDs 88PCBoDD30RCJoJ6x0gYjQYqnY3oI0S8QopLTy477cCRGsta8d7nQ/Gzv67O8742umhD k/TiefMSo7CCu1Xu/xj5K7O8bK0Ab28qn2Nmq9IPN6xXiR2y+RHe1B0IGIsvj9o/dHzd GWGh8i4jzaC7sSv6sRwCT8uJl5Xr9VTQIvK50fxmmed7nng2HD6BmqI5KEKWoM+LC1jr fYsmPY8ZWZ5lPcdlKvFrHk93Qq51CKh8ddk1AZuwaybm0s3tLRQ9J52gpX2K4NDiotQG kR3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=TuV6tIomwv3IkUcFvWNuFch+WQpiTuPNcKoBkGBW1OY=; b=EEZg8MyP31qIhxtm7AteZHHDcEQO+br8UD7W182KCrIqWcaRwwOHfjUoAtaiu0/Zha dS+fw7ik9AoGF6txUT8vdN8iesgR3WrNIiIZpbW/jPXO4hyqYllx+SW2iU+jCSTEnMHQ Is+jrClg+7Gd6noWxgNURCh3oxvhP3gVXum1dDcIhqhv2z7pR/ODX08ntBg5n2tbDCeL ZcmP5WThTUa83TC7YCvhnMSbp5pLqDVpdKc1VBXaTosiIuwZlGGg9NF/eDy7lfumzVTr BebBXy6jQjFQVmHOWit8bTg3oE8vqZRdUl24kxNGbC4ZdS9Nx3WQxA/1HK4134jlvdCC GR3Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u14si7455811edd.346.2020.05.19.01.15.34; Tue, 19 May 2020 01:15:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727884AbgESIL4 (ORCPT + 99 others); Tue, 19 May 2020 04:11:56 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:38102 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726318AbgESILz (ORCPT ); Tue, 19 May 2020 04:11:55 -0400 Received: from ip5f5af183.dynamic.kabel-deutschland.de ([95.90.241.131] helo=wittgenstein) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jaxLb-0000Ea-Hq; Tue, 19 May 2020 08:11:35 +0000 Date: Tue, 19 May 2020 10:11:34 +0200 From: Christian Brauner To: "Eric W. Biederman" Cc: Jann Horn , Kees Cook , Al Viro , Andrew Morton , Tetsuo Handa , Eric Biggers , Dmitry Vyukov , linux-fsdevel , linux-security-module , Linux API , kernel list Subject: Re: [PATCH 1/4] exec: Change uselib(2) IS_SREG() failure to EACCES Message-ID: <20200519081134.voejjt77b3qjf22h@wittgenstein> References: <20200518055457.12302-1-keescook@chromium.org> <20200518055457.12302-2-keescook@chromium.org> <20200518130251.zih2s32q2rxhxg6f@wittgenstein> <20200518144627.sv5nesysvtgxwkp7@wittgenstein> <87blmk3ig4.fsf@x220.int.ebiederm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <87blmk3ig4.fsf@x220.int.ebiederm.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 18, 2020 at 06:57:15PM -0500, Eric W. Biederman wrote: > Christian Brauner writes: > > > On Mon, May 18, 2020 at 04:43:20PM +0200, Jann Horn wrote: > >> On Mon, May 18, 2020 at 3:03 PM Christian Brauner > >> wrote: > >> > Also - gulp (puts on flame proof suit) - may I suggest we check if there > >> > are any distros out there that still set CONFIG_USELIB=y > >> > >> Debian seems to have it enabled on x86... > >> > >> https://salsa.debian.org/kernel-team/linux/-/blob/master/debian/config/kernelarch-x86/config#L1896 > >> > >> A random Ubuntu 19.10 VM I have here has it enabled, too. > > > > I wonder if there's any program - apart from _ancient_ glibc out there > > that actually use it... > > I looked at uselib in codsearch but the results were quite unspecific > > but I didn't look too close. > > So the thing to do is to have a polite word with people who build Ubuntu > and Debian kernels and get them to disable the kernel .config. Yeah, I think that's a sane thing to do. I filed a bug for Ubuntu to start a discussion. I can't see an obvious reason why not. > > A quick look suggets it is already disabled in RHEL8. It cannot be > disabled in RHEL7. > > Then in a few years we can come back and discuss removing the uselib > system call, base on no distributions having it enabled. > > If it was only libc4 and libc5 that used the uselib system call then it > can probably be removed after enough time. > > We can probably reorganize the code before the point it is clearly safe > to drop support for USELIB to keep it off to the side so USELIB does not > have any ongoing mainteance costs. > > For this patchset I think we need to assume uselib will need to be > maintained for a bit longer. Yeah, agreed. It doesn't matter as long as we have a plan for the future to remove it. I don't think keeping this cruft around forever should be the only outlook. Christian