Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp18571543rwd; Tue, 27 Jun 2023 20:09:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4QLkh6TUH2rP0fqP/lV67dIAbgcpFa+1Xbp5wHOpALNqoAQ2qoCf025vnCYZwif1Zxr371 X-Received: by 2002:a05:6214:e84:b0:632:3633:700c with SMTP id hf4-20020a0562140e8400b006323633700cmr15558849qvb.6.1687921756051; Tue, 27 Jun 2023 20:09:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687921755; cv=none; d=google.com; s=arc-20160816; b=w1uS7psSgcJ3z66+iMfAtLMAmffOEnke52GhGcgvVB5qhA8H8ZgGP6YfLDy/PMFvqi jSEbWaBTj3zNd7utRklbri6oxazwuyg2ZZV0kb/mF88L8+YJoBb3bjd+2AMVvGYJyE7L TlcA9tQVt7SBCqMS3AhzUH5J+MOePYAr50FUeqXAnJ+TUykaMhEIWSaAq2op7JwTdfVh 5w1a8KagP9xo9De65KCN7E5PTfV5z8YRk21eYS41NbhvIOpnaukq1U9+0l4epcVbmuBl 3a0vCCiCUyNvdIvrUQsf/+x/5BqC+DdJ7eflmrzPpHy5eKLrJvyIHM2LuvhbSmYLD+WG FpPw== 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:to:from:date:dkim-signature; bh=kVok7rzReJkeEE0XESE8noQp0aQi4RQQpEfbsHD9BtY=; fh=pBfw2sy5d9D1BF3g/+GVtOlJwO3sY8Rfkz4I+BiDboY=; b=t16Vi+CQ7Xx9pr7f22jSaKU6kIlsrvGxV/buUKScBCNZh7JwQN2Yzb9yPExphHyajT ngTRjAdPCbFCgHQwvXT9yZBbNOLHBIsIMkvPfhQuQtISc/nFw9IiJzDQpSo17u0eDQRU a2ThtwfI3+aYL7bW4+Knx0Bkfpbcas1eSeT/fB5g+sT1eTdgVAy+Dns3S1tW8ObiZpIz NPqEbT2mRL+SfaivqdP8uGkn+9oR1RIIs2dWKpSsiwY+UagNRjj44MZtAnNB7kjR7F/7 icqnHAuSahJ8fovP5Ha/ofrANtyDg40ZbL1moDZEaVScEYi4waNvTMVgOw5VGdRi5gW2 4LpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=mzGmJi6l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h187-20020a636cc4000000b0055795190dd2si7547116pgc.666.2023.06.27.20.09.02; Tue, 27 Jun 2023 20:09:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=mzGmJi6l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S230121AbjF1Csw (ORCPT + 99 others); Tue, 27 Jun 2023 22:48:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230059AbjF1Csu (ORCPT ); Tue, 27 Jun 2023 22:48:50 -0400 Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C69E129 for ; Tue, 27 Jun 2023 19:48:49 -0700 (PDT) Received: by mail-qt1-x82b.google.com with SMTP id d75a77b69052e-3fddb0bd9e2so56576171cf.0 for ; Tue, 27 Jun 2023 19:48:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1687920528; x=1690512528; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=kVok7rzReJkeEE0XESE8noQp0aQi4RQQpEfbsHD9BtY=; b=mzGmJi6lVfSsOj7545pCntro7v3QarhrsIt+fs8v7HEBmtHW4nslN/9QUPmXfks8FK AIEaM393mwGtNY/kvI7av2GrIzhPWfUXFSgIO//osLPg7sUuqxTHlZtcfJrHZANNEXV4 KQ8LSrVzYRB4dQOWW9VQLL55LG1t8hyIwBMGw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687920528; x=1690512528; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=kVok7rzReJkeEE0XESE8noQp0aQi4RQQpEfbsHD9BtY=; b=EbjQtkIDL9KAnuJrnCloXAKRqM9OC8aNfVMOfDqMtgqq2cldGdVWnak/y3pYkscMHo 7AF4Q+BmwwW5NeHWfOA1RITtvKkS0kCfI0rUQhjCw80fMNNR3CK7m3olq07USwOdnaNi 5LooekS/0Q+402TM4KJVIHtbNTthRUX37d1F1NxG8RDBNLwzqTmTQ2sppl5T7mfb1rRA 1iB2C9Dfiiu7ovxMQ9Q4p5UWIqdiYMVfcrAFxGSbmQd6QlcZRCzWB6SiLQM111soZLGR dketp6cXRn18FSnQU1/82y7QdTdjSsK59lnrdFcnE49jvctGXtADyfVD4UvL6TmL0XXE 5UZA== X-Gm-Message-State: AC+VfDx1QN2Hbrn5aHbyA/cz4rtI9lj3/t+nRX6SZ5Ec2Os1S5lqmJzJ zvJEsONdCteHt950o9TdRIsHYQ== X-Received: by 2002:a05:622a:178b:b0:3ff:33d6:da9f with SMTP id s11-20020a05622a178b00b003ff33d6da9fmr27306908qtk.49.1687920528214; Tue, 27 Jun 2023 19:48:48 -0700 (PDT) Received: from www.outflux.net (198-0-35-241-static.hfc.comcastbusiness.net. [198.0.35.241]) by smtp.gmail.com with ESMTPSA id s17-20020a632c11000000b0053f2037d639sm6390668pgs.81.2023.06.27.19.48.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jun 2023 19:48:46 -0700 (PDT) Date: Tue, 27 Jun 2023 19:48:45 -0700 From: Kees Cook To: Samuel Thibault , Kees Cook , Greg Kroah-Hartman , Jiri Slaby , Simon Brand , linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org, Dave@mielke.cc Subject: Re: [PATCH v3 2/2] tty: Allow TIOCSTI to be disabled Message-ID: <202306271944.E80E1D0@keescook> References: <20221022182828.give.717-kees@kernel.org> <20221022182949.2684794-2-keescook@chromium.org> <20221227234000.jgosvixx7eahqb3z@begin> <20221228205726.rfevry7ud6gmttg5@begin> <20230625155625.s4kvy7m2vw74ow4i@begin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230625155625.s4kvy7m2vw74ow4i@begin> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jun 25, 2023 at 05:56:25PM +0200, Samuel Thibault wrote: > > Can we perhaps just introduce a CAP_TIOCSTI that the brltty daemon would > > be able to use? We could even make it only allow TIOCSTI on the linux > > console (tty->ops == con_ops). Does brltty run with CAP_SYS_ADMIN? That seems a sensible exception to be made. > *Please* comment on this so we can progress. ATM people are > advising each other to set dev.tty.legacy_tiocsti=1, which is just > counter-productive in terms of security... So is there really no solution for brltty and TIOCSTI being disabled? What is FreeBSD doing? I imagine it's the same situation there too, though maybe there is just no support? https://www.mail-archive.com/brltty@brltty.app/msg02892.html > Really, this a serious regression for the people affected by this. Can you send a patch adding a CAP_SYS_ADMIN exception? -Kees -- Kees Cook