Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5804618pxb; Wed, 26 Jan 2022 23:02:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJweSmMGwdvPfcA5e+fEw1eO9UAw1CxjViC9u2snPoc4XyyR+fhjj8hkplv22eloufeKDhFB X-Received: by 2002:a63:8142:: with SMTP id t63mr1843108pgd.256.1643266942239; Wed, 26 Jan 2022 23:02:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643266942; cv=none; d=google.com; s=arc-20160816; b=VAqfe4GHYjHhhD0FGNIleQ1K9akKt2BpUPZS6n5KmK3bEIK6G38FuCUB4rWfPB0Ikc S8meqGIsfALmIsQAeCybPqrQYpalt6x8uslkTY/Qa8Y0YIkKG4XrHy9pA9nQrG2IFBQN 7r+qaVy9K8Ak5FFrkrtKiJD/n2AVhPZnrVA+GgyetpomH5Km1CTdLXzgCiXi7re9KyK0 szsAt9cEvnkMAwZKN23D5y3w6EDBB1KPZi5LFSGQQvo61QJ5LqD3PgkL9cpKIxfWVizV oSdQj8PDSafLkr88XPmx0kebHScq8nHyBkBxpHKd7VIt/dUQmC5ptPmjzqRA0EuhKPT7 avuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Ohka9ylvwErx9g3m7SUbwTYWiZ3JYvdVBIeKBfo+8i0=; b=tiNl9v4a7CfcyHIqt182qXOf53DGB77WejEDAO4CbIJRySOr7H7pLZB3px7Z9resDx csoNzempPxsxJhERVoZ85M9E6GKg7DBOLpDuFVYdXwIu0c9ZrIy33rnWd4x2QL0+ejeu gncYo4qG/HoOT8Q/6Ac0Z9Wjwfy9z2m3A3RVsuTCUSzDz7l0pUWMPqcNKdeLfl11iIjs 3/JZLL7wzQy+11Eq4gSloupDLx0CjIZ0Hz3Wys0o4zsH3TomnVgLqJVaffeyaRdff6jU 0d0F9SRVZ/iSUWs1CNG3T2/L48ZDjyICoGl8L2HWwDpXz/VJ4oXrk+5UvpZjgNmcqU79 wwjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=Fo3BfHkU; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o10si4248084pjt.140.2022.01.26.23.01.46; Wed, 26 Jan 2022 23:02:22 -0800 (PST) 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; dkim=pass header.i=@chromium.org header.s=google header.b=Fo3BfHkU; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232486AbiAZX5m (ORCPT + 99 others); Wed, 26 Jan 2022 18:57:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232340AbiAZX5i (ORCPT ); Wed, 26 Jan 2022 18:57:38 -0500 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78726C06161C for ; Wed, 26 Jan 2022 15:57:37 -0800 (PST) Received: by mail-pf1-x42b.google.com with SMTP id n32so1085576pfv.11 for ; Wed, 26 Jan 2022 15:57:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=Ohka9ylvwErx9g3m7SUbwTYWiZ3JYvdVBIeKBfo+8i0=; b=Fo3BfHkU4Bhk/n3uAwINnKCUL8bWPsJHCe4rvnKyepD/7j1Pk7QkRFXBh83I2ZwVvg bjNpktlScU1tCLFFpJxhpBxX99QBSrKywuixHTivmGrfbThXDOlGPRHxG5feyU6OY6vF 3sxvofWqQQldelsTRGDu/XNhH7zFyD3hctGZ8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Ohka9ylvwErx9g3m7SUbwTYWiZ3JYvdVBIeKBfo+8i0=; b=vuk7vzqCWhTls0L4Q2eauum+RAHJgyMfGDjRoXGMJAHDNu+jsqqDXy6Yb90VaOHlTC EE8NwHfqBhvYTqB00vK/kV60/NG+Jxs0O9Iizftix6EeJsX0QhCeKmFgBZej36MEWSrl gpJNLSVU3zpgtojVPHXFI8kDAZBAmgrizNUAaJz5y13FblRbfGDosklPveZC4WEjePlk yPzIwSwI4AzD8g5eqnzU7E3+wvfJSxNvb2DEtrucdVh9+wE8QDiPUPRwrniz9D7elMzo GTAqFXwJEm89+hvDoCu5kTHi7tObY6Px5sGITq7qVQZp7PIdC4VGsT0pL2iF1NHZ2MUZ fLpQ== X-Gm-Message-State: AOAM531BqCtDyxoWtJEwJbQ8BG3t7SpXKOpaE0S3RzuoXADSsgHPmFdd iCvCE4s1Kmo5kxPXzPcDojPyrQ== X-Received: by 2002:a62:e304:: with SMTP id g4mr1118118pfh.61.1643241456977; Wed, 26 Jan 2022 15:57:36 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id f8sm584999pfv.24.2022.01.26.15.57.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jan 2022 15:57:36 -0800 (PST) Date: Wed, 26 Jan 2022 15:57:35 -0800 From: Kees Cook To: Heikki Kallasjoki Cc: Ariadne Conill , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Eric Biederman , Alexander Viro Subject: Re: [PATCH] fs/exec: require argv[0] presence in do_execveat_common() Message-ID: <202201261545.D955A71E@keescook> References: <20220126043947.10058-1-ariadne@dereferenced.org> <202201252241.7309AE568F@keescook> <39480927-B17F-4573-B335-7FCFD81AB997@chromium.org> <44b4472d-1d50-c43f-dbb1-953532339fb4@dereferenced.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 26, 2022 at 12:33:39PM +0000, Heikki Kallasjoki wrote: > On Wed, Jan 26, 2022 at 05:18:58AM -0600, Ariadne Conill wrote: > > On Tue, 25 Jan 2022, Kees Cook wrote: > > > Lots of stuff likes to do: > > > execve(path, NULL, NULL); > > > > I looked at these, and these seem to basically be lazily-written test cases > > which should be fixed. I didn't see any example of real-world applications > > doing this. As noted in some of the test cases, there are comments like > > "Solaris doesn't support this," etc. > > See also the (small) handful of instances of `execlp(cmd, NULL);` out > there, which I imagine would start to fail: > https://codesearch.debian.net/search?q=execlp%3F%5Cs*%5C%28%5B%5E%2C%5D%2B%2C%5Cs*NULL&literal=0 > > Two of the hits (ispell, nauty) would seem to be non-test use cases. Ah yeah, I've added this to the Issue tracker: https://github.com/KSPP/linux/issues/176 -- Kees Cook