Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp26171imm; Tue, 24 Jul 2018 13:18:37 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc/PHU8BzFvfKFTTLWr4qFjGkCJMEZlT29mjQlEXq7h1v0NJCR/7N067zwllxLPJdDwJASC X-Received: by 2002:a62:e18:: with SMTP id w24-v6mr19185930pfi.145.1532463517165; Tue, 24 Jul 2018 13:18:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532463517; cv=none; d=google.com; s=arc-20160816; b=b15opsvjS4fT3KSnaiNVwKKD9zXqhPqdWCNTb8ZdieTOrJVRg8LyQHT55uAeamr294 GyPzpvvOj8zA3s2jLwU3wdnSqBhS6VAhWgHCdtDHXPHREf0u9Hircs58fwu5ZqjpH3dp vfBmH0s+EkzGD/aqkfaBCISsNGXUb8L3HRif6IGA6q8XvJ7WuQ5CojqMcwa6kYXEQNS+ 2eCXMMkdvwhfUEhgi7/ovSYWk1zSxoEL+zbbiIjQAqnviEZxPqdK24b9x5nTahmC1c7t 0O96T4eyIB1gwU/UH5kwiNRS8mhXCKiCHEqZ0ZCSmjJUHL6W/YgRtx97cwm9ww5T9Z+a PNVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=HzOTaNgEV2PT/zNNp3mDF3NDzLmZM7jae331scRigko=; b=jVOeGOKLa3qc17Nvdm8M9kPT++bNNshOJVrR0Rwz2yQXinP+uuPx5d+JEahBpOfdel FmzUDR4DruCoGiRCQsEpe2VThXXcb58Ga3LMBdJlLI2ysfDFa/w1X/aHW+RqTKi7FZKp aZk9ufA07W8FXfizj+ehzhQMo+0zR7FP4Ufi6Mt5kQqOvORIIP5RbHgXVxpfhbnaGdDl RemEeQxizhE+QBHbL4z5q56yjO0bEC6ak3r80vOO8IucAeEB7FIC0rH2rGqJZL3K7Dvb 3FNkkM6FgiSW9p9rR2aiKMSj6w2C13hapBrHEbyERaEva92+TGDrBcg1pbE9hF93WekT 44+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=EqOgpfLI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m2-v6si12424497pfi.351.2018.07.24.13.18.21; Tue, 24 Jul 2018 13:18:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=EqOgpfLI; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388747AbeGXVZk (ORCPT + 99 others); Tue, 24 Jul 2018 17:25:40 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:45436 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388666AbeGXVZk (ORCPT ); Tue, 24 Jul 2018 17:25:40 -0400 Received: by mail-lf1-f66.google.com with SMTP id j143-v6so3848523lfj.12 for ; Tue, 24 Jul 2018 13:17:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HzOTaNgEV2PT/zNNp3mDF3NDzLmZM7jae331scRigko=; b=EqOgpfLIvtDXIF8GyWTQSjSMnxTwhG5y7n0lIzfguw46fT+kPI0+NP6sqjfoWApg97 RS6gn3JFH/vtD4rUs6r0887sVb2QiIxwIIajXVwCnppncJ0gyxrUlA1FgTMjCsm8AIZd A7VxW+YWf+gtBQn2sfDtLbjCID3t4JS7GZ3BIyW5NWl2/WTCx8/C9DzEGzpnGxrVMUwM J2ljtY3TwgZwj7uKRDRaUaN9V7jwJ0hzuGpoqm/JYiwXDKwDBy1ppCB8NEt9cigav1VC 2PzG30lCQw528CWaPlcRRBpfL3k+cpuZByxzvfSR2KoDDH20ZqDrquRZGY0m6h7PQltX +djw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=HzOTaNgEV2PT/zNNp3mDF3NDzLmZM7jae331scRigko=; b=Z5+Ml5VoVbqdilZGPKe0dqbIiLazoIJBl1wJhVzfNKEJnqUwnW59qTM2+sFrNeUAMu LNs0Kn8uDagp+U4zYR/JgVKR60KH8opF4EvizZbcF/73iaNBxuCFPoJI7wRF4UPzRVwY Mg2vidKS88TLNC0hYYmFsVH92IoRLEWdTsTU6lyr6tUHks1tZLhxsdUGSN7AITptdYd4 TD6BZA//4YU+MsnR4GW92ncx0zmf9qQRquOrm2mSld35BAhsZdPOw/KWjGAD29eRVLR8 bKt3IKk+0Ah8J58JNdYWKEaY3YaJVt4b7HO2LUAWEkcoLCKZliqCKvTOxfg3qaaOACiA fnVA== X-Gm-Message-State: AOUpUlH6TpnIDNq5oYh9jPs0ecuZUUG57Bjy/VqJLCOgBj45sHx4QsDL KNOq2DinW6aKgPueVviGsZb/V3Dj0Dnec6/VinTK X-Received: by 2002:a19:de4e:: with SMTP id v75-v6mr10524878lfg.14.1532463451006; Tue, 24 Jul 2018 13:17:31 -0700 (PDT) MIME-Version: 1.0 References: <907e32319825bb6336a662f4f6f6d173f56f3226.1529003588.git.rgb@redhat.com> <20180712214608.ed4chli7mdc7ymin@madcap2.tricolour.ca> <20180723164035.wkazolpmpf3mvdxw@madcap2.tricolour.ca> <20180724130203.by5ev4xhaixgzvq5@madcap2.tricolour.ca> In-Reply-To: <20180724130203.by5ev4xhaixgzvq5@madcap2.tricolour.ca> From: Paul Moore Date: Tue, 24 Jul 2018 16:17:19 -0400 Message-ID: Subject: Re: [RFC PATCH ghak59 V1 3/6] audit: exclude user records from syscall context To: rgb@redhat.com Cc: Eric Paris , linux-audit@redhat.com, linux-kernel@vger.kernel.org, sgrubb@redhat.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 24, 2018 at 9:05 AM Richard Guy Briggs wrote: > On 2018-07-23 17:00, Paul Moore wrote: > > On Mon, Jul 23, 2018 at 12:43 PM Richard Guy Briggs wrote: > > > On 2018-07-12 17:46, Richard Guy Briggs wrote: > > > > On 2018-06-28 18:11, Paul Moore wrote: > > > > > On Thu, Jun 14, 2018 at 4:23 PM Richard Guy Briggs wrote: > > > > > > Since the function audit_log_common_recv_msg() is shared by a number of > > > > > > AUDIT_CONFIG_CHANGE and the entire range of AUDIT_USER_* record types, > > > > > > and since the AUDIT_CONFIG_CHANGE message type has been converted to a > > > > > > syscall accompanied record type, special-case the AUDIT_USER_* range of > > > > > > messages so they remain standalone records. > > > > > > > > > > > > See: https://github.com/linux-audit/audit-kernel/issues/59 > > > > > > Signed-off-by: Richard Guy Briggs > > > > > > --- > > > > > > kernel/audit.c | 12 +++++++++--- > > > > > > 1 file changed, 9 insertions(+), 3 deletions(-) > > > > > > > > > > I think this is fine, but see my previous comment about combining 2/6 > > > > > and 3/6 as a safety measure. > > > > > > > > This one I left as a seperate patch for discussion. We'd previously > > > > talked about connecting all possible records with syscall records if > > > > they exist, but this one I'm unsure about, since we don't really care > > > > what userspace process is issuing this message. It is just the message > > > > content itself that is important. Or is it? Are we concerned about > > > > CAP_AUDIT_WRITE holders/abusers and want as much info about them as we > > > > can get in case they go rogue or pear-shaped? > > > > > > I'm waiting on re-spinning this patchset because of this open question. > > > > > > Is connecting AUDIT_USER* records desirable or a liability? > > > > Like I said, I think special casing the AUDIT_USER* records so they > > are *not* associated with other records is okay, and perhaps even the > > right thing to do. The problem is that we don't have the necessary > > context (har har) to match any kernel events (and there is the > > possibility that there are none) to the userspace generated > > AUDIT_USER* event. Further, I don't think this is something we would > > ever be able to solve in a reasonable manner. > > Ok, having said that, I think I'd still prefer to keep this patch > seperate, partly to retain the simplicity of the previous patch and make > very clear what each one is doing, and partly if we decide to change our > mind in the future that these AUDIT_USER* records should be autonomous. Okay, I'll buy that argument. -- paul moore www.paul-moore.com