Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp507683ybz; Tue, 21 Apr 2020 13:24:21 -0700 (PDT) X-Google-Smtp-Source: APiQypJmhiZSfMdiosymCDhtmqurTJflo+xoz/mjyPFvrNi5OjpCRgYE36f/kYQinZQaTCPAm3y9 X-Received: by 2002:aa7:d4c3:: with SMTP id t3mr1628842edr.191.1587500661107; Tue, 21 Apr 2020 13:24:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587500661; cv=none; d=google.com; s=arc-20160816; b=As/GYeU0V9mJ9Kpdpl4vB29ZB7Xgxw5FERVO2A440YY1YXXFr/SOAm+Ufv6He3ynze c2XU97L+B6Y/KdNNxMtGFtxC/8/oXHutAl7HnAQgkg8Pj1oJyxnI3cnNZa73zmZkO43p zKODJhjZs/fUo4J/qaX33l284xwsZq4PxiAuk2bo2iUpgN5DZUHS3/7ZrHvqPT8wTzdZ QYBRvWCbNyiAebbGI0qJpj6XnyhtH/cXPrbCfyyLLdiMCM5xC/1QMXZGZGEUoCxCu3Gx EL7q9wUFh4e9nJnOlBvMRw0/RFPlr/vjshOxNiGeqky9S+mJHPHaP4A6VA/mZfWGPQ+2 s9oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=EqwDhsb0LCzxwEp0N46fUM7Jiee3HrTDQZIAQEZpzC4=; b=UC2SMadnNNbPL0flNC67Igddt9kDo+kOyTYJkgIpUkUnkOcqwXYwL9uaL6dACi82QN Q80PCE2PgYOfLuC0Rv5/V5qsVgdCRJiCa92BmO+mU1DxQYvYhyikZUxFeMUPuQIOcyLh 0Owc03a3FNtPHMdFqpJMmMVTKo3KxaQdlrXIbxZjq8s2hPE8JbT+rml3rbrNYMcTqADa mKSMo5Rxo3ygwEf13Vv93x1ZjvdQ8VhWZMsiPv+9tue0JgmIWr8sOwOyw8QwJXZARR4a DGD/Ya+LIly9wWM2q+JcFkaBemSpO+/vBn6qrQtoXJinFCeGRbD+QcBFQHsd8ws+URS1 bA1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=L3x2dROi; 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 g7si2192969edn.251.2020.04.21.13.23.58; Tue, 21 Apr 2020 13:24:21 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=L3x2dROi; 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 S1726214AbgDUUUF (ORCPT + 99 others); Tue, 21 Apr 2020 16:20:05 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:39676 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725930AbgDUUUE (ORCPT ); Tue, 21 Apr 2020 16:20:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587500403; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=EqwDhsb0LCzxwEp0N46fUM7Jiee3HrTDQZIAQEZpzC4=; b=L3x2dROiutpHhE6thT9hBtB1W0WhVIUbC6aC0U4mv0oaAZueLpsjhmQS0yiwvUi7JHJbjd WyyvirGKeWEmq+iANB95VlHvirptq/ayglUd2COUfhrXxHEJgS8Ei4Q6rtFUZaHZAsQgDH 57Q9CCfiEbUXz5HC4KNWhZ2TjBlO3HU= 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-391-6mw8GRbXMZaLRTiXi98PdQ-1; Tue, 21 Apr 2020 16:19:57 -0400 X-MC-Unique: 6mw8GRbXMZaLRTiXi98PdQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 10F89107ACC9; Tue, 21 Apr 2020 20:19:56 +0000 (UTC) Received: from madcap2.tricolour.ca (unknown [10.3.128.9]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5540660BEC; Tue, 21 Apr 2020 20:19:48 +0000 (UTC) Date: Tue, 21 Apr 2020 16:19:45 -0400 From: Richard Guy Briggs To: Paul Moore Cc: Linux-Audit Mailing List , LKML , netfilter-devel@vger.kernel.org, twoerner@redhat.com, Eric Paris , fw@strlen.de, ebiederm@xmission.com, tgraf@infradead.org Subject: Re: [PATCH ghak25 v3 3/3] audit: add subj creds to NETFILTER_CFG record to cover async unregister Message-ID: <20200421201945.spw3ec4duusijswl@madcap2.tricolour.ca> References: <13ef49b2f111723106d71c1bdeedae09d9b300d8.1584480281.git.rgb@redhat.com> <20200318131128.axyddgotzck7cit2@madcap2.tricolour.ca> <20200318213327.ow22q6nnjn3ijq6v@madcap2.tricolour.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-04-17 17:53, Paul Moore wrote: > On Wed, Mar 18, 2020 at 5:33 PM Richard Guy Briggs wrote: > > On 2020-03-18 17:22, Paul Moore wrote: > > > On Wed, Mar 18, 2020 at 9:12 AM Richard Guy Briggs wrote: > > > > On 2020-03-17 17:30, Richard Guy Briggs wrote: > > > > > Some table unregister actions seem to be initiated by the kernel to > > > > > garbage collect unused tables that are not initiated by any userspace > > > > > actions. It was found to be necessary to add the subject credentials to > > > > > cover this case to reveal the source of these actions. A sample record: > > > > > > > > > > type=NETFILTER_CFG msg=audit(2020-03-11 21:25:21.491:269) : table=nat family=bridge entries=0 op=unregister pid=153 uid=root auid=unset tty=(none) ses=unset subj=system_u:system_r:kernel_t:s0 comm=kworker/u4:2 exe=(null) > > > > > > > > Given the precedent set by bpf unload, I'd really rather drop this patch > > > > that adds subject credentials. > > > > > > > > Similarly with ghak25's subject credentials, but they were already > > > > present and that would change an existing record format, so it isn't > > > > quite as justifiable in that case. > > > > > > Your comments have me confused - do you want this patch (v3 3/3) > > > considered for merging or no? > > > > I would like it considered for merging if you think it will be required > > to provide enough information about the event that happenned. In the > > bpf unload case, there is a program number to provide a link to a > > previous load action. In this case, we won't know for sure what caused > > the table to be unloaded if the number of entries was empty. I'm still > > trying to decide if it matters. For the sake of caution I think it > > should be included. I don't like it, but I think it needs to be > > included. > > I'm in the middle of building patches 1/3 and 2/3, assuming all goes > well I'll merge them into audit/next (expect mail soon), however I'm > going back and forth on this patch. Like you I kinda don't like it, > and with both of us not in love with this patch I have to ask if there > is certification requirement for this? I know about the generic > subj/obj requirements, but in the case where there is no associated > task/syscall/etc. information it isn't like the extra fields supplied > in this patch are going to have much information in that regard; it's > really the *absence* of that information which is telling. Which > brings me to wonder if simply the lack of any associated records in > this event is enough? Before when we weren't associating records into > a single event it would have been a problem, but the way things > currently are, if there are no other records (and you have configured > that) then I think you have everything you need to know. > > Thoughts? I'm good dropping that third patch, but Steve's perspective is more authoritative here. I'll respin patch 1/3 and 2/3 to fix the checkpatch.pl errors if you prefer (was erroneously mentioned in ghak28 feedback). > paul moore - 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