Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp5991485pxb; Mon, 28 Mar 2022 21:30:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLSzPHoNsirvfoiBJbDBNJJX8Hflgh8qfOG+5eyDaou9h021/B4a/LvXcVI4i5v63BwceJ X-Received: by 2002:a17:907:7e86:b0:6df:939a:81e3 with SMTP id qb6-20020a1709077e8600b006df939a81e3mr32848855ejc.323.1648528243463; Mon, 28 Mar 2022 21:30:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648528243; cv=none; d=google.com; s=arc-20160816; b=JOIjD9thO2Fvw8ziKncm2wbfPqY0LoLKkmbGGr7lVhuUmz0gSo3f3S/QRfbG7Ai5tG 68FHFehhNl8MoOIH2Bkjdt2xhu/5ak2zdo5HOeUBxXSZwrG8bcGk10bGxXHnBGiDb2QL zScIP9c+VhNbmhtZGvF8kE5RK28+ClvuqrU1qtL/xJiQmUC4O+MTY8b+3+dGdPGKU9dF myLMl2aojd/+QtcxsHuxDXjKn/j1n5UXKrjkHZeifk02MunYGAf2KUYvKpX+fTF+gpCK +4lvgCrUksmbWcgtkpOxKQSqquEjfvLS0uvxCunha1CtreOCEV8TDEKjXHIlJVtrCKzw TDqg== 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:subject:cc:to:from:date:message-id:dkim-signature; bh=K9v2ULS9mYTr++spxmd9Eb26jIZAkD2Gt9jFbo3C2CE=; b=s6HTD2F4cKyzA1P38PdiI6bVCpJTr3UnpzXKzUP6Fdpvhds6wSToRMhjbtphD+AUtP bfbDBWkSoKz/aa4ZMy1/jyFWWu5BSkaFk3G9dT1zbH20iI/01DhveKmhJENVTrlJIjvt Qdz6iY1CSlO1jZcfQF9n9xAUqPLXsTeihWoc7lNzPG1S7xdMy2E3dkuuoKNwB0sUmZ2M pg1AWyWWeune8iMaaA9JWCpL5bABle2kZBKD3QFqxW/UiIhD+Dtrzp02bAQKcMBoK9Bv EJv57lX0RyYBgLOsId+NvE9KxkS9Q4AdBdYi1XIeA2TGATvhg5m7jHdQzjuM7PYS5tuV PwRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=iAr6SWiI; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y16-20020a056402441000b00419c71133ddsi2459104eda.540.2022.03.28.21.30.12; Mon, 28 Mar 2022 21:30:43 -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=@gmail.com header.s=20210112 header.b=iAr6SWiI; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231636AbiC2DXs (ORCPT + 99 others); Mon, 28 Mar 2022 23:23:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231637AbiC2DXr (ORCPT ); Mon, 28 Mar 2022 23:23:47 -0400 Received: from mail-qt1-x835.google.com (mail-qt1-x835.google.com [IPv6:2607:f8b0:4864:20::835]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BD847EB10 for ; Mon, 28 Mar 2022 20:22:05 -0700 (PDT) Received: by mail-qt1-x835.google.com with SMTP id c4so14230100qtx.1 for ; Mon, 28 Mar 2022 20:22:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:from:to:cc:subject:references:mime-version :content-disposition:in-reply-to; bh=K9v2ULS9mYTr++spxmd9Eb26jIZAkD2Gt9jFbo3C2CE=; b=iAr6SWiIrN+QLCMonaexPNXmVPgZaByTCMEYwPCbIRo+VqoHxly7673hJLCvacs7kt SDMWSCRfZE4kuRjKXzvfw4B+x5HVJ7Gej3IAF2QvW1WMrCT/DOBHUFLtkYNwTjr2NtBR LLFQnBhWtRlo5oAa3/hqEC9ld/t50Lp/9SILtOszT9MerbVIixoIDfS9Iwb3cAEVogWM zHrvN4YxBi0/++OZR6gzHK3Tm0IxOlMqiH4KOgMxjn4kLXv0KiyKGVdrl7k3x0oYKwYD VayfSIHdc8sHTMYuP/14d/Jiq4sPZFCtg8N0ONJB69lEJFzWfKv4FzkvT4aZ8NamNX73 e/2w== 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=yZr+oNlnx2QKKG9myVNDzXY+izDVphOPgRdi/O3NNNxKTHdQYq9Ye4QOQq3cOPPF0Q NJiuUUVgusCYDDnNyhEGuIzMg3ytoPNGTG125b7nam0yp7GtFt6B1v/z1ltouU9SWkz/ MM9AnCFZFoxhLwkqN+gzR5+rlrqA65bxDUXjrwr/Pp48rLFi1iEAMPmttZjrTvLL8vUQ Rab9JAXi+R7rMQ2nmjDUXZX7cfogfwhhjofP18V1v5NqIbYBQQNJkpXtHOh1k54JjPO2 G5iELEBQ8tyGI7wxY5FSH2h0dvHdBQc4U0UIQwmYSqDVMXS4cNFpvvLiFK11CeyLogbg 4KSQ== X-Gm-Message-State: AOAM531FtZ6cZpQVnxtuDycEP0iEYhyan0q6Kkh5L6TD9JJ+1yjpS1Kl o1lar/rPX/cxnxUB/7UKfEA= 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 Cc: rth@twiddle.net, ink@jurassic.park.msu.ru, mattst88@gmail.com, eparis@redhat.com, linux-audit@redhat.com, kbuild-all@lists.01.org, linux-kernel@vger.kernel.org, Yang Yang , Zeal Robot 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 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