Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1736022ybn; Thu, 26 Sep 2019 01:10:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqzMsL2ATvafp18A9kVMkWVRXOBBi6QxGEpa6To6QOFxZf3u9ZOcpsFEMvdpj47Sreqxt1oq X-Received: by 2002:a50:b501:: with SMTP id y1mr2159601edd.167.1569485437820; Thu, 26 Sep 2019 01:10:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569485437; cv=none; d=google.com; s=arc-20160816; b=eR1EdBb2RRW3Kqu1y0/YJ+pY10G0CY1GoWKkOZfC/dQAu5D4vd3r1hpTJpPYxo+HJ7 mOknFcnCW9BWtQi6PuwOl0oWDdbts3z4eB81XslZedA7KIhYpRuNyA9KacV+k+a7v97c P3agfh8nnpYppPCegM3veU5MwS3y0FQf/qz3jyaeCUzvaZ5SZJz3x2gI1NpNXEByAB06 ilBorFVvmtZ3xUnorJplzUNtHlse9hAOtvq2XoYMDzuk/gBtBJBesbiD+GQ55v8b/5Fz 8ZTxuXm4uK+jM+6dQ6YBiaCc3xGGvEL/dm5rMXopAvQHaUOSXfvrFxQrx8BbSthhX2B8 KJhw== 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; bh=wxCwkXx63p9y7i71Dm/pj3kV3Esoub7Hnq9qk5P0ufY=; b=ULKbHyJqRoDEcuNtZrKiFsxVFp1sa/7kBAYZ9e5QLGatsUVYg3vXFDEyby9HACHYVw V24iFcumj0nGE1yOTxw5sVwSpYpPZALIhRl0BIQdbhSLltmqq3xBMHutwbpwbSWHiUjo rFPni10k9Fd9bSbxxRxz+cSb/1ZgP5kL8fBvanXn38u3iW9Y7Jyixerg585pBjcwH10u b3c04vb7fbMkjAxnccwtj+foYkE8+FYvEmogYmDi8LDLzMzsm6noeJTd2YjF3OhR3Cxu Rj1A1kQhhj2vZZBFFDWqgIMryHGUjSMicyWzump0CM64zCeIpcP+DqT0Lv6AFiXOAbqo N5dw== 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 oz25si601890ejb.175.2019.09.26.01.10.14; Thu, 26 Sep 2019 01:10: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; 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 S2409627AbfIXNu4 (ORCPT + 99 others); Tue, 24 Sep 2019 09:50:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46622 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727500AbfIXNu4 (ORCPT ); Tue, 24 Sep 2019 09:50:56 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 54E9210DCC92; Tue, 24 Sep 2019 13:50:56 +0000 (UTC) Received: from madcap2.tricolour.ca (ovpn-112-19.phx2.redhat.com [10.3.112.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 83A07608C2; Tue, 24 Sep 2019 13:50:49 +0000 (UTC) Date: Tue, 24 Sep 2019 09:50:46 -0400 From: Richard Guy Briggs To: Paul Moore Cc: Dave Jones , linux-audit@redhat.com, Linux Kernel Subject: Re: ntp audit spew. Message-ID: <20190924135046.kkt5hntbjpcampwr@madcap2.tricolour.ca> References: <20190923155041.GA14807@codemonkey.org.uk> <20190923210021.5vfc2fo4wopennj5@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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.64]); Tue, 24 Sep 2019 13:50:56 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-09-23 23:01, Paul Moore wrote: > On Mon, Sep 23, 2019 at 5:00 PM Richard Guy Briggs wrote: > > On 2019-09-23 12:14, Paul Moore wrote: > > > On Mon, Sep 23, 2019 at 11:50 AM Dave Jones wrote: > > > > > > > > I have some hosts that are constantly spewing audit messages like so: > > > > > > > > [46897.591182] audit: type=1333 audit(1569250288.663:220): op=offset old=2543677901372 new=2980866217213 > > > > [46897.591184] audit: type=1333 audit(1569250288.663:221): op=freq old=-2443166611284 new=-2436281764244 > > > > Odd. It appears these two above should have the same serial number and > > should be accompanied by a syscall record. It appears that it has no > > context to update to connect the two records. Is it possible it is not > > being called in a task context? If that were the case though, I'd > > expect audit_dummy_context() to return 1... > > Yeah, I'm a little confused with these messages too. As you pointed > out, the different serial numbers imply that the audit_context is NULL > and if the audit_context is NULL I would have expected it to fail the > audit_dummy_context() check in audit_ntp_log(). I'm looking at this > with tired eyes at the moment, so I'm likely missing something, but I > just don't see it right now ... > > What is even more confusing is that I don't see this issue on my test systems. > > > Checking audit_enabled should not be necessary but might fix the > > problem, but still not explain why we're getting these records. > > I'd like to understand why this is happening before we start changing the code. Absolutely. This looks like a similar issue to the AUDIT_NETFILTER_CFG issue where we get a lone record unconnected to a syscall when one of the netfilter table initialization (ipv4 filter) is linked into the kernel rather than compiled as a module, so it is run in kernel context at boot rather than in user context as a module load later. This is why I ask if it is being run by a kernel thread rather than a user task, perhaps using a syscall function call internally. > 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