Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp7335675rwp; Tue, 18 Jul 2023 13:47:11 -0700 (PDT) X-Google-Smtp-Source: APBJJlHwyQgm97xbs9611HgQ4RXZl7L47BaUR6v35t2B1hUkvDKajMLiWXKd9tfHElMe2cpQb98y X-Received: by 2002:a17:903:32d1:b0:1b8:a469:53d8 with SMTP id i17-20020a17090332d100b001b8a46953d8mr1024979plr.0.1689713230880; Tue, 18 Jul 2023 13:47:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689713230; cv=none; d=google.com; s=arc-20160816; b=IR0vr3dQqrEl/VQjrGrzlLb2HRdG3Q3bY2hBa+GCxJGpLAbGFTgnbFr4QQGtL8Td1/ 5a0yihwt+ZbfcXh/9YM12gG4ccOaXGwvbYODEdtIZQoPgxrbtEnixD8uspm6zeU0pbIx tlW5+rFyvy/kS/5mUtRIE2Z8nluNi+ALnLDUGU4BKGA5qAFQcuEmszniT9O0DFliXjqH UbW6qaAgT112W/qafoVAIxKZmFXLrcLd6seFIsADfH3ZsjjKHK76hXlslYKewu/S47iy Ac2IgM38/arN1Wulabtk7KZ5Yc+RG+GVhETezLdcYEthl0xEcYH1aXWaokw7GDkxwLja Q94w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version:date :message-id:subject:references:in-reply-to:cc:to:from:dkim-signature; bh=oVimXmbmZTbISW+7n71WjspppK5V6kmtNbt/YEu7vIA=; fh=vy3cCQdC5Y8Qufbq4GBVgVpUPtgAgcjEv6TBZP6MJOw=; b=xDfxZIIV2Ghc+1LkaM8S4kWlHEQIbzk9JL1nF1qpYJvDgKJDeo7/UcrkF+iKm5aOff hAS+il6JMObDgieb2JyXVmg9bR9SEzma+Kw+EKnUtz6+iLVlPPGJFiZX/B5YWXWSj8l0 aCnGO2EzcJC24ycxJo1tKAwXFp5E0kJLaCfXDfodhvXy19zl7fRnBGuYdR6FSiqVZ/8o 3lX+eE11BUBXiUWDw0Fuu7hIixAFW1nYBkjThKsQxb0BsupEfFlzT0cm5bolOvV+wEIy xOUdB+SToZGTgUaAqniGgsxunp8lYmqkJ+RCU56gLon0jyXb+HAOWu1lownMuOUVWOMj Ct4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20221208.gappssmtp.com header.s=20221208 header.b=XQBKteEL; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ij9-20020a170902ab4900b001b5395382a0si2141722plb.212.2023.07.18.13.46.57; Tue, 18 Jul 2023 13:47:10 -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=@kernel-dk.20221208.gappssmtp.com header.s=20221208 header.b=XQBKteEL; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229504AbjGRUQq (ORCPT + 99 others); Tue, 18 Jul 2023 16:16:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229479AbjGRUQp (ORCPT ); Tue, 18 Jul 2023 16:16:45 -0400 Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 955431995 for ; Tue, 18 Jul 2023 13:16:44 -0700 (PDT) Received: by mail-io1-xd29.google.com with SMTP id ca18e2360f4ac-785ccd731a7so68816239f.0 for ; Tue, 18 Jul 2023 13:16:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20221208.gappssmtp.com; s=20221208; t=1689711403; x=1690316203; h=content-transfer-encoding:mime-version:date:message-id:subject :references:in-reply-to:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=oVimXmbmZTbISW+7n71WjspppK5V6kmtNbt/YEu7vIA=; b=XQBKteELQXQuORaGgRT8MImSS86ueNUmG6KmdfwU/IYB/3xX2bftT3kU9krYco4iBf 2EY8gyAq93spVBZSeqNYbMhhVAusjsvMI1i+kW9/79nxRDHJWUZIUOeXBLQUo4ITiaKl hN8dttzbEUwpb9easpzanAVhKCsCH1l3TletOmmAzhY0OFJkRLieHyvIBykbFUElb0ey TEyR95wK6S7ITaK/cyhFaVEkXNH5ouo6FD5Ijo1bJ8LI7BXHVca0G0EVijlMgl2+bk7e b6nyPVioInukFXEV/ytCqgQ5BKwCPXvEK6nzq5B/tYyL2ovFrPSa6xDzNIFvb7ztxnEk pByg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689711403; x=1690316203; h=content-transfer-encoding:mime-version:date:message-id:subject :references:in-reply-to:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oVimXmbmZTbISW+7n71WjspppK5V6kmtNbt/YEu7vIA=; b=N4NAaQFJfwCPIEMBkUN8fVG6Sh3kulKh3a+lO4n23BDwmwJFIUIdA8TBYpou2jm/XB EGXnI+eu7OsyT9WTzhJL9qj6EAVGiGc4Pt7DXHNONjUYn+vvFO9zvSCyVLQeXHRZGqUN G+qwp9DMx33Om1+vFlJ8e58eB4xEF3okgfxj2U7CFTe8v9mLz8HENdCsHyxfErFZnf8d WioQZAwv4jkjXBrXGmVo6w/4MkCvGPdSLH87o5bVEAeQS1u6SUyxdXLRCsA0K4RQ3TV/ emGI5ZS5Zg3TQey6IN2++0XYZFFzmHL9wz2/2N5KXFRaQt50x2ZqQE4a9DqDjR0C/CL3 oa9Q== X-Gm-Message-State: ABy/qLY3W5zKf0NgbSi+AGJ1BDchNLmzj1AvT7E3KOvjnJmdi8rZuPiN hLve88NHirm8v6LtrqTYvg3x29JWZY7/XjMZH/8= X-Received: by 2002:a05:6602:3f04:b0:780:d65c:d78f with SMTP id em4-20020a0566023f0400b00780d65cd78fmr3674323iob.2.1689711403339; Tue, 18 Jul 2023 13:16:43 -0700 (PDT) Received: from [127.0.0.1] ([96.43.243.2]) by smtp.gmail.com with ESMTPSA id x7-20020a5e8f47000000b00785cfdd968bsm845993iop.5.2023.07.18.13.16.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jul 2023 13:16:42 -0700 (PDT) From: Jens Axboe To: Ondrej Mosnacek Cc: Pavel Begunkov , io-uring@vger.kernel.org, linux-security-module@vger.kernel.org, selinux@vger.kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230718115607.65652-1-omosnace@redhat.com> References: <20230718115607.65652-1-omosnace@redhat.com> Subject: Re: [PATCH] io_uring: don't audit the capability check in io_uring_create() Message-Id: <168971140212.1482414.1220631096211660246.b4-ty@kernel.dk> Date: Tue, 18 Jul 2023 14:16:42 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: b4 0.13-dev-099c9 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Tue, 18 Jul 2023 13:56:07 +0200, Ondrej Mosnacek wrote: > The check being unconditional may lead to unwanted denials reported by > LSMs when a process has the capability granted by DAC, but denied by an > LSM. In the case of SELinux such denials are a problem, since they can't > be effectively filtered out via the policy and when not silenced, they > produce noise that may hide a true problem or an attack. > > Since not having the capability merely means that the created io_uring > context will be accounted against the current user's RLIMIT_MEMLOCK > limit, we can disable auditing of denials for this check by using > ns_capable_noaudit() instead of capable(). > > [...] Applied, thanks! [1/1] io_uring: don't audit the capability check in io_uring_create() commit: 6adc2272aaaf84f34b652cf77f770c6fcc4b8336 Best regards, -- Jens Axboe