Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp702613pxf; Wed, 31 Mar 2021 13:58:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwt8fa4H7umRSSqmASzoCQiLUeS4RM3QwFZVeZgHT+8BHmhSycCwVC992E4b5oJY6O3h1jF X-Received: by 2002:a17:907:204c:: with SMTP id pg12mr5666029ejb.225.1617224322887; Wed, 31 Mar 2021 13:58:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617224322; cv=none; d=google.com; s=arc-20160816; b=ac60SkUWeScmSOTi6FIXtKe14ZYseRbIP+xdRhOSkkrIK9NdgIhhKlx22XM8sMdgez R04UBvFNsgoCUFu340iFpkubg+lSmAu7LZHxsAQoCchihHv49XEialKd81nR8VMO3SSN 27Wiwryg4zQK34ki+KTrSnWkR5coNu/K4YAHm8Ss81UWC+bGrnSSrKmRRaIOBcgubC64 jQIGz5BiQEcIPQDAqJgoGWokjMDdxL3E5egdwA2rMKXbI3XSTtWZ4m9Vv/fYzkQoH4I4 cVZtak+8SEKq3KFazMYfazHRGX7v1AeirOdx59/stBuH9eQBRo+cQ3/Mp0foticvrnMY 9/ug== 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:cc:to:from:date; bh=v04GCSo+5F0IYfT2hwceJKMMB6Fod0qrz04vvLpX6PI=; b=PyCttUg/bZVXLAaspT2CwT0J4tiP8Gb3Uz6AWdPlPG/CBnsTSVtcR0jz8XOLfMJ/ni zMzrka6G6yR3u+01D/dLGz5Z5dfIv4LAQm1QPbRe1HcUe7qDl+V2adeK9e3sQjwT5kLF WpJCDe3z7PsqUbQdHA4B/0VV9Y7HomsHeMYS5byELsmaf5JJ1++SOyAg2GpetA7uFYDe DejQtOcUr/8Eg3ea4goEZ7gAr8xWPyGNss8IkQAYBNWdA+eXucWQjFa/CPnTyIZRIg37 C8EEKMHTTUpL6V4UH9cwv8vf6w229mjZx0lpptu7yFQUYqrDC7/SZ0cp8hytAfqSfBKC aaNg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s9si2603962edc.296.2021.03.31.13.58.17; Wed, 31 Mar 2021 13:58:42 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232467AbhCaU5A (ORCPT + 99 others); Wed, 31 Mar 2021 16:57:00 -0400 Received: from mail.netfilter.org ([217.70.188.207]:49038 "EHLO mail.netfilter.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232644AbhCaU4m (ORCPT ); Wed, 31 Mar 2021 16:56:42 -0400 Received: from us.es (unknown [90.77.255.23]) by mail.netfilter.org (Postfix) with ESMTPSA id 4B22A63E47; Wed, 31 Mar 2021 22:56:26 +0200 (CEST) Date: Wed, 31 Mar 2021 22:56:39 +0200 From: Pablo Neira Ayuso To: Richard Guy Briggs Cc: Linux-Audit Mailing List , LKML , netfilter-devel@vger.kernel.org, Paul Moore , Eric Paris , Steve Grubb , Florian Westphal , Phil Sutter , twoerner@redhat.com, tgraf@infradead.org, dan.carpenter@oracle.com, Jones Desougi Subject: Re: [PATCH v5] audit: log nftables configuration change events once per table Message-ID: <20210331205639.GA4972@salvia> References: <28de34275f58b45fd4626a92ccae96b6d2b4e287.1616702731.git.rgb@redhat.com> <20210331202230.GA4109@salvia> <20210331205310.GA3141668@madcap2.tricolour.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210331205310.GA3141668@madcap2.tricolour.ca> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 31, 2021 at 04:53:10PM -0400, Richard Guy Briggs wrote: > On 2021-03-31 22:22, Pablo Neira Ayuso wrote: > > On Fri, Mar 26, 2021 at 01:38:59PM -0400, Richard Guy Briggs wrote: > > > Reduce logging of nftables events to a level similar to iptables. > > > Restore the table field to list the table, adding the generation. > > > > > > Indicate the op as the most significant operation in the event. > > > > There's a UAF, Florian reported. I'm attaching an incremental fix. > > > > nf_tables_commit_audit_collect() refers to the trans object which > > might have been already released. > > Got it. Thanks Pablo. I didn't see it when running nft-test.py Where > was it reported? CONFIG_KASAN. > Here I tried to stay out of the way by putting that > call at the end of the loop but that was obviously a mistake in > hindsight. :-) No problem, I'll squash this incremental fix into your audit patch.