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 40FC7C433EF for ; Wed, 30 Mar 2022 13:08:59 +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-658-QMKy0gP2PcG1HwnVrqYALA-1; Wed, 30 Mar 2022 09:08:56 -0400 X-MC-Unique: QMKy0gP2PcG1HwnVrqYALA-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0499E380391D; Wed, 30 Mar 2022 13:08:55 +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 50D14401475; Wed, 30 Mar 2022 13:08:53 +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 332E919451F3; Wed, 30 Mar 2022 13:08:53 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id C064819451ED for ; Wed, 30 Mar 2022 05:59:56 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id B211F42B927; Wed, 30 Mar 2022 05:59:56 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AE6DC42B924 for ; Wed, 30 Mar 2022 05:59:56 +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 95755899EC5 for ; Wed, 30 Mar 2022 05:59:56 +0000 (UTC) Received: from mail-qv1-f51.google.com (mail-qv1-f51.google.com [209.85.219.51]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-267-bVKO85NZMLabkjPCFRtZVA-1; Wed, 30 Mar 2022 01:59:54 -0400 X-MC-Unique: bVKO85NZMLabkjPCFRtZVA-1 Received: by mail-qv1-f51.google.com with SMTP id jo24so16155567qvb.5; Tue, 29 Mar 2022 22:59:54 -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=Fii15z5BdqeKVdyRrQjR89UzGkIpNccPLX9tr8s7gIA=; b=f4Uc4/eA9w97SUW1B/kbysulHkp7LRowhc2Kfa//oyVgNBLWmao91fa/2y47ak+O7r 8h8ure87MOxZl6EHiuD8DGLQTynCtb+TPeX6DBsThSLWDOw9CqoZ/lUhN0cQzOfev7/M +ldLskIpSYPBntRAGZnu3YtDp/KNSbEWqfLD1GG3DIkSaNjh9e72ckjjTLLIKPU8xxx/ wsqMsGyK5hdZe9xdCCaJ99Ck56mtRepQHbyAkhoVRxGRmrI6dZgjLaZIK67iqzaO7sXo I5yjuhEBLzV+NffULB5K+1KBG8hI5070eBi6Z+Sytl3hd4t5/pxeVfBaAiqo83q+aJas zySA== X-Gm-Message-State: AOAM530j5AyWE7A/OfqeACAQdX/FMF6RgaLTQpCW6jYl+SWILpEjoyON 2qgWXIz52hIN7SWvuKSQSymZqIaKQKI= X-Google-Smtp-Source: ABdhPJy7JhQnst3fNKGP6qDDp0NbdUv+svIp+Ze3jCARpjEflPmrl1E9FEk9a+xm0onCdHJQkFWRJQ== X-Received: by 2002:a05:6214:20e4:b0:441:7bed:5ccd with SMTP id 4-20020a05621420e400b004417bed5ccdmr25606284qvk.119.1648619992562; Tue, 29 Mar 2022 22:59:52 -0700 (PDT) Received: from localhost ([193.203.214.57]) by smtp.gmail.com with ESMTPSA id z19-20020a05622a029300b002e1a763dac1sm16867557qtw.9.2022.03.29.22.59.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Mar 2022 22:59:51 -0700 (PDT) Message-ID: <6243f1d7.1c69fb81.b19c7.7ec1@mx.google.com> X-Google-Original-Message-ID: <20220330055949.GA2378119@cgel.zte@gmail.com> Date: Wed, 30 Mar 2022 05:59:49 +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> <62427b5c.1c69fb81.fc2a7.d1af@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.9 X-Mailman-Approved-At: Wed, 30 Mar 2022 13:03:10 +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.10 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 Tue, Mar 29, 2022 at 09:11:19AM -0400, Paul Moore wrote: > On Mon, Mar 28, 2022 at 11:22 PM CGEL wrote: > > 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 > > You can add an audit filter without explicitly specifying a syscall: > > % auditctl -a exit,always -F auid=1000 > % auditctl -l > -a always,exit -S all -F auid=1000 > I have tried this, and execute program which call syscall number is -1, audit still didn't record it. It supports that there's no need for audit to handle syscall number less than 0. sh-4.2# auditctl -a exit,always sh-4.2# auditctl -l -a always,exit -S all > -- > paul-moore.com -- Linux-audit mailing list Linux-audit@redhat.com https://listman.redhat.com/mailman/listinfo/linux-audit