From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 900BEC433EF for ; Tue, 29 Mar 2022 12:34:35 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-632-GSjRBYgyN6udDxCevlw8lQ-1; Tue, 29 Mar 2022 08:34:30 -0400 X-MC-Unique: GSjRBYgyN6udDxCevlw8lQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8C9C4280094D; Tue, 29 Mar 2022 12:34:28 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3B489C44AEB; Tue, 29 Mar 2022 12:34:26 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 0F49F1940345; Tue, 29 Mar 2022 12:34:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 81E061949762 for ; Tue, 29 Mar 2022 03:22:22 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id BD3F3C08F11; Tue, 29 Mar 2022 03:22:21 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B9350C08F0F for ; Tue, 29 Mar 2022 03:22:21 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 7CCEF811E9B for ; Tue, 29 Mar 2022 03:22:11 +0000 (UTC) Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com [209.85.160.175]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-359-olj-1hF6MkaYFO1gJqxSMQ-1; Mon, 28 Mar 2022 23:22:05 -0400 X-MC-Unique: olj-1hF6MkaYFO1gJqxSMQ-1 Received: by mail-qt1-f175.google.com with SMTP id i4so14227124qti.7; Mon, 28 Mar 2022 20:22:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:from:to:cc:subject:references :mime-version:content-disposition:in-reply-to; bh=K9v2ULS9mYTr++spxmd9Eb26jIZAkD2Gt9jFbo3C2CE=; b=1Epv41I6H9UpWYGs2PGIk7VQtCfQSNaO6oJSKqOmOZgLOEiXpHX5+V0p8htIw7Fxwj u9L65Gs4fb4uZEw2UDMY5grrsLK8pt7itmGONP1GBd9pEXmwwxq8LNWyDfgso68FuCP1 GpEPVFHRJ80Qmtyr/n89Ze2elYHk3v8gIJyCuLDECNGXj7KMCsM/xgM+XxF1Qrmab5n+ yK//9M9wpAMDM9wCH0lCRz6wxlx3SeyeHDCkrO9URcwC7B8I8bl4XaJt+pJIuWHNCGM2 6scSTbeOX4nAJJHWD5+3s+RT8OTmgbhMa4uYEXu9HOXDmdlyuYC1JdLmw/xT+Nb6KnqT u9Xg== X-Gm-Message-State: AOAM531iTIIg4iPkBSRRbGCpEDPTZsV+F27eTgQ//eyyIoymrPaU5f+Q 5MI39IjrcXmBxDoNXLt/lY8= X-Google-Smtp-Source: ABdhPJw+JVbHzZm6ftwez213TcAnf+g+6a/xat/wmtCmcQgFxCxvj7I/VIXS5IHfFfCawLU86YsC9A== X-Received: by 2002:a05:622a:1c7:b0:2e1:ed8b:7180 with SMTP id t7-20020a05622a01c700b002e1ed8b7180mr25160711qtw.305.1648524124715; Mon, 28 Mar 2022 20:22:04 -0700 (PDT) Received: from localhost ([193.203.214.57]) by smtp.gmail.com with ESMTPSA id d26-20020a05620a159a00b0067d4f5637d7sm8878641qkk.14.2022.03.28.20.22.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Mar 2022 20:22:04 -0700 (PDT) Message-ID: <62427b5c.1c69fb81.fc2a7.d1af@mx.google.com> X-Google-Original-Message-ID: <20220329032201.GA2375412@cgel.zte@gmail.com> Date: Tue, 29 Mar 2022 03:22:01 +0000 From: CGEL To: Paul Moore Subject: Re: [PATCH] audit: do a quick exit when syscall number is invalid References: <20220326094654.2361956-1-yang.yang29@zte.com.cn> <202203270449.WBYQF9X3-lkp@intel.com> <62426553.1c69fb81.bb808.345c@mx.google.com> MIME-Version: 1.0 In-Reply-To: X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 X-Mailman-Approved-At: Tue, 29 Mar 2022 12:34:24 +0000 X-BeenThere: linux-audit@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Audit Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kbuild-all@lists.01.org, Zeal Robot , linux-kernel@vger.kernel.org, eparis@redhat.com, Yang Yang , linux-audit@redhat.com, ink@jurassic.park.msu.ru, mattst88@gmail.com, rth@twiddle.net Errors-To: linux-audit-bounces@redhat.com Sender: "Linux-audit" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=linux-audit-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Mon, Mar 28, 2022 at 11:06:12PM -0400, Paul Moore wrote: > On Mon, Mar 28, 2022 at 9:48 PM CGEL wrote: > > Sorry could anybody give a hand to solve this? It works well on x86_64 and arm64. > > I have no alpha environment and not familiar to this arch, much thanks! > > Regardless of if this is fixed, I'm not convinced this is something we > want to merge. After all, a process executed a syscall and we should > process it like any other; just because it happens to be an > unrecognized syscall on a particular kernel build doesn't mean it > isn't security relevant (probing for specific syscall numbers may be a > useful attack fingerprint). > Thanks for your reply. But syscall number less than 0 is even invalid for auditctl. So we will never hit this kind of audit rule. And invalid syscall number will always cause failure early in syscall handle. sh-4.2# auditctl -a always,exit -F arch=b64 -S -1 Syscall name unknown: -1 > -- > paul-moore.com -- Linux-audit mailing list Linux-audit@redhat.com https://listman.redhat.com/mailman/listinfo/linux-audit