Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1589812ybn; Wed, 25 Sep 2019 22:02:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqyEqTOBpZPweNjVZQjFMMu0OazHOJ4GEchhLr/V0FCJewdH4PQQ+izINhm3TZEZsxnwVMdF X-Received: by 2002:a17:906:698c:: with SMTP id i12mr1471664ejr.260.1569474160977; Wed, 25 Sep 2019 22:02:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569474160; cv=none; d=google.com; s=arc-20160816; b=gIMitLpBjYU/XsCz+8ZF1WiAFFv6VW2B10G16m29ALS9i0LjxP7ZS6HJUUMAz0L3iK 3N67yW4WeJVSHVsTLJTkUSMAWL8fc0XdoEztBT1xnqHtWZx3DIa6tkGBp/Pa7AXGSaNZ tPOWy9JhIHKW8gfZRzJaddSyHcDjt2+Yw/ichV0THJ1TzFy1zT3izuT9bJH1++7Zs6s8 EyEYBw1nvpXHQA7/A+gsORWSHMDbSJR3zR0U9mIZ/0IPbOABqqJzhLMTWmDIOQ+y9fUc lYyw4YX35wfavJ33UreEnhpZ/A7kt/GAXMCPoF2nCcVsUuyrRLA1mSpmuzv+87UnSdYI O4Og== 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=NFBVUmkBL+a1m9GLyTSbw2kLpGJK0wk8l04Wge5OWqE=; b=nVdEWQoYreyxVu7e8iuHeEfEUGFtp2xLWSQM3tW14Oz8ssBQlbyrQBn860y6tANpiS jIgrOHdxc833l7AV5vnUk0wQqjCS21QAlgIZ0gNV42Xj2TkY5u75O76aR4b8paHPD3+6 BcNvVK1FINtMdrIJre78wcVjY16DWBOI5Q5sy8SCHOe4bkKzLVkyZhlqpuSU06AGQVRb 3l1yjYfDF4oN3UJzwOqjdDeA+HUjab/vqxbJBxIPq5f9Djv7NyuvYqOHCc2SK5WEbm/h zBzg7r3APM72V6K5v2I+PF1DYIY5/7ZZ5MpMINU5vYwS0osCJWlwevd1uQgyA6v3H+6f j5qg== 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 g8si652663edb.335.2019.09.25.22.02.17; Wed, 25 Sep 2019 22:02:40 -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 S2502904AbfIWVAb (ORCPT + 99 others); Mon, 23 Sep 2019 17:00:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49526 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2502897AbfIWVAb (ORCPT ); Mon, 23 Sep 2019 17:00:31 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3B153308FBA9; Mon, 23 Sep 2019 21:00:31 +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 6BB55194BB; Mon, 23 Sep 2019 21:00:24 +0000 (UTC) Date: Mon, 23 Sep 2019 17:00:21 -0400 From: Richard Guy Briggs To: Paul Moore Cc: Dave Jones , linux-audit@redhat.com, Linux Kernel Subject: Re: ntp audit spew. Message-ID: <20190923210021.5vfc2fo4wopennj5@madcap2.tricolour.ca> References: <20190923155041.GA14807@codemonkey.org.uk> 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.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Mon, 23 Sep 2019 21:00:31 +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 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... Checking audit_enabled should not be necessary but might fix the problem, but still not explain why we're getting these records. > > [48850.604005] audit: type=1333 audit(1569252241.675:222): op=offset old=1850302393317 new=3190241577926 > > [48850.604008] audit: type=1333 audit(1569252241.675:223): op=freq old=-2436281764244 new=-2413071187316 > > [49926.567270] audit: type=1333 audit(1569253317.638:224): op=offset old=2453141035832 new=2372389610455 > > [49926.567273] audit: type=1333 audit(1569253317.638:225): op=freq old=-2413071187316 new=-2403561671476 > > > > This gets emitted every time ntp makes an adjustment, which is apparently very frequent on some hosts. > > > > > > Audit isn't even enabled on these machines. > > > > # auditctl -l > > No rules > > [NOTE: added linux-audit to the CC line] > > There is an audit mailing list, please CC it when you have audit > concerns/questions/etc. > > What happens when you run 'auditctl -a never,task'? That *should* > silence those messages as the audit_ntp_log() function has the > requisite audit_dummy_context() check. FWIW, this is the distro > default for many (most? all?) distros; for example, check > /etc/audit/audit.rules on a stock Fedora system. A more selective > configuration could simply exclude the TIME_ADJNTPVAL record (type > 1333) from the records that the kernel emits. > > We could also add a audit_enabled check at the top of > audit_ntp_log()/__audit_ntp_log(), but I imagine some of that depends > on the various security requirements (they can be bizzare and I can't > say I'm up to date on all those - Steve Grubb should be able to > comment on that). > > -- > paul moore > www.paul-moore.com > > -- > Linux-audit mailing list > Linux-audit@redhat.com > https://www.redhat.com/mailman/listinfo/linux-audit - 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