Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3464339pxb; Mon, 4 Apr 2022 17:49:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/lFf8jaW84R6Q61ZCbxJ3Ygyd1JJwVSgxqqYPhq1A/SQfjt+NJl5Azs8+D8Xtxrw9kUSh X-Received: by 2002:a17:902:d5d7:b0:156:1968:8b2f with SMTP id g23-20020a170902d5d700b0015619688b2fmr780239plh.97.1649119781294; Mon, 04 Apr 2022 17:49:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649119781; cv=none; d=google.com; s=arc-20160816; b=VfcFh1alDTfPsclBGIaguhsP/clV71rfgoLf1WQpvYuD3Xnp8X3qOUv9gM/RsJjdiE rnM/kxy0bPnkiRWGOqx9XwzAX/OWxQ+0Hxy/3MofkiByNWdRprcjLT8I4HycC/iYRtQ+ FfZf4por0wxnCsHDPw7g8pbofXl+6sFp3vgiS1UzEVK/c587hDC7lXKOhiDV1XTGI0Qw h0xQFPmtmchjZvySaHe1+vPsR0511gOndPo1UnxXesEltnWfHtoa8KN1uR275JM37akZ 2RNai40W48Fji+ytcvZLsHJ2Ejj3dNlBWvHfg7QRJxIaSdEMBAGO5AiVKHtoBS2/3rLV XngQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=bmS8kGPX3oqylsdkqHV+AyKQ/jkv5xD40RzktvQFBCA=; b=yRxH76J+fab8bWNAxK8nxRFTY1CU1R/3vY4DOQuSNEWhXdgbgmFCgSeMmPomwyZrMT JaYsGuESQCMVXGv7O5kVBZP/9LDwlsqpUhamD0s9WkAVpMSX7arNtGzM1fdvxHeqdAxi cCr3Z4vcDO1HoNXm+znX3m7DhzHcBkhQd3LGo8mKMxPDRYIRWfN/EK06PFvJSm4452ns /LCbD3VV1qPJziThq3D4evs5JFyxMo2Ehdg3h1cXu5j9+sjmumsS3CsBxYC9QRIYj/QU KrwxPIoAblVGMej0q9V5NRhSwJdzhQN6xkhfFzPAWvscAHcoequ+NqwldW2x0ADbuslR Kcew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paul-moore-com.20210112.gappssmtp.com header.s=20210112 header.b=k3AbnEjC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id i10-20020a17090332ca00b00156c1fb5366si2111644plr.539.2022.04.04.17.49.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 17:49:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@paul-moore-com.20210112.gappssmtp.com header.s=20210112 header.b=k3AbnEjC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C58F0DEBB1; Mon, 4 Apr 2022 16:59:32 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346775AbiDAOSt (ORCPT + 99 others); Fri, 1 Apr 2022 10:18:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346704AbiDAOSs (ORCPT ); Fri, 1 Apr 2022 10:18:48 -0400 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4644322F3D6 for ; Fri, 1 Apr 2022 07:16:58 -0700 (PDT) Received: by mail-ej1-x633.google.com with SMTP id dr20so6132151ejc.6 for ; Fri, 01 Apr 2022 07:16:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bmS8kGPX3oqylsdkqHV+AyKQ/jkv5xD40RzktvQFBCA=; b=k3AbnEjCIO9KtJuKhqWav0ixKZGHdzUpJy0TB96ZwLJiUMb6aBwkvyouonOEy3740l fx+KLUxr3Ia/2nW6ZvHzpeNLwC0KjhtU4t60G1gNpq9/O/M+LfEk3UAwCC8d3zraGTAW fPBcgXJ+/tzxgN4e/a/94pWU+DLGhDAIuLHOSna6SJhRUzOdB7/+z/35Qh4nGCc9I0hw DWlYmYVgfY7gadz7pIyxbSc3niS3o9PBkf4VhPtH+vcP0ZiLUucPsOasugiMMFhg1/gu eVqpap4/BBB3BrfE4TuScREYvqrqPm9iSebuiRQH2TKIw7aP1mLqbUOrzDHnJDxtkpn0 zbww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bmS8kGPX3oqylsdkqHV+AyKQ/jkv5xD40RzktvQFBCA=; b=lhk8QrO7PVn3okdMw/CeQXje4WFtE1w8WEtGeqjfhLzgQIzyPTZ5YI6M7likkotQwH 6KNFGkxCE/rn1hLf4s7A7cJKVYdbp01PKSZd5qfz6L4dvfS/EC4+Cs7oI6rdwTOyUaSX fvIDiW3rO9CGOyFJGjxttKzDLyuE+6q1f43G2rkkZEDlXR7c3VAeIIY4vjElruCHZsCH blIZzK5H+CI+zNUV0wFQfsINFMs7r8LCMe3GJALsIVoLRuB/CMSEojt7nbjOfe+m2mHa Erso4P3YEJ6WPVU5n7JjxjLgt/JhJE3eVO1HPkT8LlU66ZiQ3ry6fvOVi/E8uY918TZQ +UwQ== X-Gm-Message-State: AOAM530b268WyhVGhiQ7Jql9m6BNTsru+UwUfCGdDTxf3zoVoFgbW9DC HTotbA+8Jl641rGXvB+Rwf8pxqNAd6hSz4nA5DVl0psthQ== X-Received: by 2002:a17:907:1b09:b0:6d8:faa8:4a06 with SMTP id mp9-20020a1709071b0900b006d8faa84a06mr9613207ejc.701.1648822616645; Fri, 01 Apr 2022 07:16:56 -0700 (PDT) MIME-Version: 1.0 References: <20220326094654.2361956-1-yang.yang29@zte.com.cn> <62465bf3.1c69fb81.d5424.365e@mx.google.com> <2777189.mvXUDI8C0e@x2> In-Reply-To: <2777189.mvXUDI8C0e@x2> From: Paul Moore Date: Fri, 1 Apr 2022 10:16:45 -0400 Message-ID: Subject: Re: [PATCH] audit: do a quick exit when syscall number is invalid To: Steve Grubb Cc: linux-audit@redhat.com, CGEL , kbuild-all@lists.01.org, Zeal Robot , linux-kernel@vger.kernel.org, eparis@redhat.com, dai.shixin@zte.com.cn, Yang Yang , ink@jurassic.park.msu.ru, huang.junhua@zte.com.cn, guo.xiaofeng@zte.com.cn, mattst88@gmail.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Fri, Apr 1, 2022 at 9:39 AM Steve Grubb wrote: > > On Thursday, March 31, 2022 9:57:05 PM EDT CGEL wrote: > > On Thu, Mar 31, 2022 at 10:16:23AM -0400, Paul Moore wrote: > > > On Wed, Mar 30, 2022 at 10:29 PM CGEL wrote: > > > > On Wed, Mar 30, 2022 at 10:48:12AM -0400, Paul Moore wrote: > > > > > If audit is not generating SYSCALL records, even for invalid/ENOSYS > > > > > syscalls, I would consider that a bug which should be fixed. > > > > > > > > If we fix this bug, do you think audit invalid/ENOSYS syscalls better > > > > be forcible or be a rule that can be configure? I think configure is > > > > better. > > > > > > It isn't clear to me exactly what you are asking, but I would expect > > > the existing audit syscall filtering mechanism to work regardless if > > > the syscall is valid or not. > > > > Thanks, I try to make it more clear. We found that auditctl would only > > set rule with syscall number (>=0 && <2047) ... That is exactly why I wrote the warning below in my response ... > > > Beware that there are some limitations > > > to the audit syscall filter, which are unfortunately baked into the > > > current design/implementation, which may affect this to some extent. -- paul-moore.com