Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3240399pxb; Fri, 12 Feb 2021 12:59:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJyo+Jh306y7+cFHWfqQCgySK1eyJuN/FfGfUlDSP3NFh74RAtGYsholB17GmXFguVqP/+TZ X-Received: by 2002:aa7:dcc6:: with SMTP id w6mr5425748edu.19.1613163543504; Fri, 12 Feb 2021 12:59:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613163543; cv=none; d=google.com; s=arc-20160816; b=p6HCbnDt90nTD1gY6gsqzHp4Wy65+Vgzc4it3uf7jfchVDlV9TYvYEtO7+dh1bW7Uc 3EQCkiMNILkx0nH7N90Y4nOehqeCOp1xb7eDQYELTrpEbZK1rr7kOm3ROUzWcKbPb8vy QI8eoQo0yzS0B5FUqYkilov7ZFFOPtaC6uAPE4/Zywx79jtH/zG9FynhFDvWQPi5dWpu 0CaVy21HVCM3QMl5mHOMThc7VIuIOq1o/7wLh66iNSUg4+GDH/vC8jMl564Eq8/9kDsu pBKiSE1oteIHC/lF9co0cO8O8k1kiz1Wn4qF94Ucv1pDMerncvOCjXW0quR9SoAzbBzW 2eJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:to:from:date :dkim-signature; bh=nefY369XOVTnG731C2OIoEJTJR52Ge56ZdFn8C2MDf4=; b=UCVM4hOFU1mSHgNaakovc0tqMiMWFaPV5tPjWEcIGuH8KH/XB+ydwj/Z7X9yTVDwui MKVmkUyCo4OdGjrQkgFmHphFCsZKAGqHBEjt4hpCHpW829/zGD0CUx9cbie285HYrUxm kOoiiijZXSb2mtEiEjR7VPOIXEPAkNqNO85uWfFBFGukVmJooYEZUNlpcRUnTGwgEuFl YrcFVRNkReUfd42p+X1xBIx6yEUY7ZUnwTmDGuSE3vXG4IX03A27PtgUCKO4fSKxjwzY TSZZv4A8ir1r9D6C0fwdJbjxLzyb1ZEGb+UgmOViPhzeBPhDkvdilLsN61vckyK4e5Zf Mr3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ikK73oPJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n18si6702687ejk.69.2021.02.12.12.58.40; Fri, 12 Feb 2021 12:59:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ikK73oPJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231735AbhBLU4y (ORCPT + 99 others); Fri, 12 Feb 2021 15:56:54 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:20106 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231604AbhBLU4W (ORCPT ); Fri, 12 Feb 2021 15:56:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613163296; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=nefY369XOVTnG731C2OIoEJTJR52Ge56ZdFn8C2MDf4=; b=ikK73oPJWL5xPStTe+NyBRJIB/Fh7zJp6tXrrr9/Hi+I89e/onVM8urWyLyjpcaBjVMrHq AZ334mWTzV0F5FttSTu3JZhpRS9gEYzAIcdxAFPA+l/2/hmo1QFCMR72c5bQ/vni66dMLJ DwlJ4xpqPASSqnrmoWAUvvZlVeOSecg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-6-8RZwlGw2O8Wy9U7SbsnMkA-1; Fri, 12 Feb 2021 15:54:52 -0500 X-MC-Unique: 8RZwlGw2O8Wy9U7SbsnMkA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5EE061885783; Fri, 12 Feb 2021 20:54:51 +0000 (UTC) Received: from madcap2.tricolour.ca (unknown [10.10.110.8]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E27E419811; Fri, 12 Feb 2021 20:54:42 +0000 (UTC) Date: Fri, 12 Feb 2021 15:54:40 -0500 From: Richard Guy Briggs To: Phil Sutter , Steve Grubb , Linux-Audit Mailing List , LKML , netfilter-devel@vger.kernel.org, Paul Moore , Ondrej Mosnacek , fw@strlen.de, twoerner@redhat.com, Eric Paris , tgraf@infradead.org Subject: Re: [PATCH ghak124 v3] audit: log nftables configuration change events Message-ID: <20210212205440.GM3141668@madcap2.tricolour.ca> References: <20210211151606.GX3158@orbyte.nwl.cc> <4087569.ejJDZkT8p0@x2> <20210212121112.GA3158@orbyte.nwl.cc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210212121112.GA3158@orbyte.nwl.cc> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-02-12 13:11, Phil Sutter wrote: > Hi, > > On Thu, Feb 11, 2021 at 04:02:55PM -0500, Steve Grubb wrote: > > On Thursday, February 11, 2021 11:29:34 AM EST Paul Moore wrote: > > > > If I'm not mistaken, iptables emits a single audit log per table, ipset > > > > doesn't support audit at all. So I wonder how much audit logging is > > > > required at all (for certification or whatever reason). How much > > > > granularity is desired? > > > > > > > > > I believe the netfilter auditing was mostly a nice-to-have bit of > > > functionality to help add to the completeness of the audit logs, but I > > > could very easily be mistaken. Richard put together those patches, he > > > can probably provide the background/motivation for the effort. > > > > There are certifications which levy requirements on information flow control. > > The firewall can decide if information should flow or be blocked. Information > > flow decisions need to be auditable - which we have with the audit target. > > In nftables, this is realized via 'log level audit' statement. > Functionality should by all means be identical to that of xtables' AUDIT > target. > > > That then swings in requirements on the configuration of the information flow > > policy. > > > > The requirements state a need to audit any management activity - meaning the > > creation, modification, and/or deletion of a "firewall ruleset". Because it > > talks constantly about a ruleset and then individual rules, I suspect only 1 > > summary event is needed to say something happened, who did it, and the > > outcome. This would be in line with how selinux is treated: we have 1 summary > > event for loading/modifying/unloading selinux policy. > > So the central element are firewall rules for audit purposes and > NETFILTER_CFG notifications merely serve asserting changes to those > rules are noticed by the auditing system. Looking at xtables again, this > seems coherent: Any change causes the whole table blob to be replaced > (while others stay in place). So table replace/create is the most common > place for a change notification. In nftables, the most common one is > generation dump - all tables are treated as elements of the same > ruleset, not individually like in xtables. > > Richard, assuming the above is correct, are you fine with reducing > nftables auditing to a single notification per transaction then? I guess > Florian sufficiently illustrated how this would be implemented. Yes, that should be possible. > > Hope this helps... > > It does, thanks a lot for the information! > > Thanks, Phil - RGB -- Richard Guy Briggs Sr. S/W Engineer, Kernel Security, Base Operating Systems Remote, Ottawa, Red Hat Canada IRC: rgb, SunRaycer Voice: +1.647.777.2635, Internal: (81) 32635