Received: by 10.223.185.116 with SMTP id b49csp1479608wrg; Wed, 14 Feb 2018 18:38:10 -0800 (PST) X-Google-Smtp-Source: AH8x225PWhji/xjQQPlQVGuYfmLIvUpksxux71bRw3QkD7AUHQxMl/Ob1O3GwRGIovTCM6ATxtjR X-Received: by 10.98.82.138 with SMTP id g132mr1129170pfb.120.1518662290601; Wed, 14 Feb 2018 18:38:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518662290; cv=none; d=google.com; s=arc-20160816; b=lLPi1MZn/eQLdWe6kHuTINsDkW7Y2i+/piIxjGI89MB+Aj49HVFL6mpRbuPWMI5UUO Cn2Xqykmqsw3nZH8C9Kv+EmLk/KN0YAX7H9VAFYi913vDIQF22+qRdgEwrk1E/IcDcc6 xQNa/2bADYX6hrL+QNNOy8jZT0vBcyBQBgtghUSPegulnZLcn4LLw1hCVsWJasmcQq4k zsDM/0cVSzqWCpDqEHoKigSLP5TbCzuEeOizoA63f32LyIUtCGQ8WnHloXZgpaCo79X9 KFO5gBiId6kFzq6pdNY5CeAvU/k5EzbWP+vMcg0860cJ0zYlvlB6nxbTuc0WeyLDN6Vy UMgg== 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:arc-authentication-results; bh=VMxSJX3MdlVj51JTxRGedEtIL2IjtMEFRQb0/enTw+Q=; b=tVVqRTP52eLo6IqO6xAskE4lW8RwC0vzhgsZWQ/S6YthogALKGgXctgMcExLppSkIH +MUzyQbAdrh6cNr2ebSUHhuUqKyY7v3ZG2+hvFL/UuOoCmB8+kNlL7PpPBFGBruMJRo3 MfCI9Tq9e8VUsIU0M1YxtJcn+es+1VLxrnErPtDxn3prN0t1WSnsxwsyLnKU1e0mpIjo 5ho89LFaMCbrD+WKQwSquipcNN33GGkFqlr8TJS1JuvTw4fypBAytJOE9LDT90VaZuOf 48sdTIQbnkPdLYXEr0iubzzRGwAA6obOOpKcOQcp8Ph0CHHvDHRhGJR3twDCHYXAYrkE rSOw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o11si3330486pgn.796.2018.02.14.18.37.56; Wed, 14 Feb 2018 18:38:10 -0800 (PST) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1032597AbeBOChT (ORCPT + 99 others); Wed, 14 Feb 2018 21:37:19 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:47780 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1032437AbeBOChS (ORCPT ); Wed, 14 Feb 2018 21:37:18 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 97329857A1; Thu, 15 Feb 2018 02:37:17 +0000 (UTC) Received: from madcap2.tricolour.ca (ovpn-112-12.rdu2.redhat.com [10.10.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2E0D02024CA4; Thu, 15 Feb 2018 02:37:16 +0000 (UTC) Date: Wed, 14 Feb 2018 21:33:27 -0500 From: Richard Guy Briggs To: Kees Cook Cc: Linux-Audit Mailing List , LKML , Eric Paris , Paul Moore , Steve Grubb Subject: Re: [RFC PATCH ghak21 1/4] audit: make ANOM_LINK obey audit_enabled and audit_dummy_context Message-ID: <20180215023327.tt2s2pbcrblz5a7u@madcap2.tricolour.ca> References: <3a9542b261d93bc4eaecfaf359affbba152cf965.1518603831.git.rgb@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171027 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Thu, 15 Feb 2018 02:37:17 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Thu, 15 Feb 2018 02:37:17 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'rgb@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-02-14 09:51, Kees Cook wrote: > On Wed, Feb 14, 2018 at 8:18 AM, Richard Guy Briggs wrote: > > Audit link denied events emit disjointed records when audit is disabled. > > No records should be emitted when audit is disabled. > > > > See: https://github.com/linux-audit/audit-kernel/issues/21 > > Signed-off-by: Richard Guy Briggs > > --- > > kernel/audit.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/kernel/audit.c b/kernel/audit.c > > index 227db99..4c3fd24 100644 > > --- a/kernel/audit.c > > +++ b/kernel/audit.c > > @@ -2261,6 +2261,9 @@ void audit_log_link_denied(const char *operation, const struct path *link) > > struct audit_buffer *ab; > > struct audit_names *name; > > > > + if (!audit_enabled || audit_dummy_context()) > > + return; > > + > > name = kzalloc(sizeof(*name), GFP_NOFS); > > if (!name) > > return; > > Doesn't this means errors here would be silent if audit isn't enabled? > I don't that; sysadmins should see this notification regardless of the > audit state... This is a user error and not a system error, so I would think if system auditing is disabled, they don't care about this kind of error. Steve? > -Kees - 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