Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp6099350imm; Mon, 27 Aug 2018 09:39:49 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaV7izlCDQTnMkWiiN11d4j9iEHW+o9NTGPa62ckeNY0pGkstNUzrE+UdUdoAEZCHgGZOep X-Received: by 2002:a63:e811:: with SMTP id s17-v6mr12966810pgh.176.1535387989035; Mon, 27 Aug 2018 09:39:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535387989; cv=none; d=google.com; s=arc-20160816; b=KRZZkPVsXAu6PiMRSw5HMt/lMdYpiURFxKk+ai2PJXhM6/+Rx3aX1zV7SC1MZZ0YGf h7je6kIgPGKcS9pmFMRA5nQoW60jgaYg4VM862K1k6pkxBF6GOBFsuEqYUgtNc15erjh V9y+DbJ647X6mog11LrRPx9+NBx8sQzmbwcY4o+ozAZDlgrDkfw+QyaDDbsPXqJ6hnhs DeHt/8gNCRtn7lUTL+0b3b7YJv98/y1wWCITtzaH4t7GH3LpQXyFuskdng5TCVVDYZoW Rp9GQaGrJv+RK5TNTAApEmitaJMNEO1N445HF3pHr7GF8NCko6O95ieDrHqTS7UI3LDw Qw0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:organization:message-id:date:subject:cc:to :from:arc-authentication-results; bh=7d81b/oLK2qod2quSd9mfy/ybOz4RjaJE8MI6LLFp90=; b=EecJRk/Q5YLpF5aUCMiBGOonSaGV4/L7+8GjF/FQNiVRygw7rPFz0Y1kxKYXikl4IC PwvVkM7pk0urY4SteUG9tTygd1LTWW40jVhc/wcWcKM53smgIBz+JcAU4dbz3UUsaRap VNcssBfFl1VLE9DelBHb6LJDmIiZIp1GNNnMwY1mPXSqh7ioCMe2aTT3UFtMBYc0Y7j9 +gF02tMlA9OCR1nms/tj01KkpciVgT1kTZsyY4ttqyjmsXw6725ergMmvjiZrVPAQJkW Qtx10pr2jLZgih+j9Zl6jed9plEjCfOZK4+JbOtyuk4jRQodPD9MDQB0bdNE/rc4JqA5 KUYQ== 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 n19-v6si12392458pfi.360.2018.08.27.09.39.31; Mon, 27 Aug 2018 09:39:48 -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 S1727167AbeH0UZf (ORCPT + 99 others); Mon, 27 Aug 2018 16:25:35 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:46748 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726995AbeH0UZf (ORCPT ); Mon, 27 Aug 2018 16:25:35 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 15E174021FC6; Mon, 27 Aug 2018 16:38:15 +0000 (UTC) Received: from x2.localnet (ovpn-124-39.rdu2.redhat.com [10.10.124.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 73C4463532; Mon, 27 Aug 2018 16:38:10 +0000 (UTC) From: Steve Grubb To: Ondrej Mosnacek Cc: Miroslav Lichvar , Linux-Audit Mailing List , Paul Moore , Richard Guy Briggs , John Stultz , Thomas Gleixner , Stephen Boyd , Linux kernel mailing list Subject: Re: [PATCH ghak10 v5 1/2] audit: Add functions to log time adjustments Date: Mon, 27 Aug 2018 12:38:09 -0400 Message-ID: <4819575.TSNxuEWROA@x2> Organization: Red Hat In-Reply-To: References: <20180824120001.20771-1-omosnace@redhat.com> <20180827075020.GL27091@localhost> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 27 Aug 2018 16:38:15 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 27 Aug 2018 16:38:15 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'sgrubb@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday, August 27, 2018 5:13:17 AM EDT Ondrej Mosnacek wrote: > On Mon, Aug 27, 2018 at 9:50 AM Miroslav Lichvar wrote: > > On Fri, Aug 24, 2018 at 02:00:00PM +0200, Ondrej Mosnacek wrote: > > > This patch adds two auxiliary record types that will be used to > > > annotate > > > the adjtimex SYSCALL records with the NTP/timekeeping values that have > > > been changed. > > > > It seems the "adjust" function intentionally logs also calls/modes > > that don't actually change anything. Can you please explain it a bit > > in the message? > > > > NTP/PTP daemons typically don't read the adjtimex values in a normal > > operation and overwrite them on each update, even if they don't > > change. If the audit function checked that oldval != newval, the > > number of messages would be reduced and it might be easier to follow. > > We actually want to log any attempt to change a value, as even an > intention to set/change something could be a hint that the process is > trying to do something bad (see discussion at [1]). One of the problems is that these applications can flood the logs very quickly. An attempt to change is not needed unless it fails for permissions reasons. So, limiting to actual changes is probably a good thing. -Steve > There are valid > arguments both for and against this choice, but we have to pick one in > the end... Anyway, I should explain the reasoning in the commit > message better, right now it just states the fact without explanation > (in the second patch), thank you for pointing my attention to it. > > [1] https://www.redhat.com/archives/linux-audit/2018-July/msg00061.html > > -- > Ondrej Mosnacek > Associate Software Engineer, Security Technologies > Red Hat, Inc.