Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1170522ybg; Wed, 29 Jul 2020 07:33:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4YqmGUIUyA80AXmQ2Gpmzho9saSpMsWC7N5NrYVkQpz9P+CqwThLiOPmtVJ/zRPUblhqD X-Received: by 2002:aa7:c251:: with SMTP id y17mr22963333edo.13.1596033239631; Wed, 29 Jul 2020 07:33:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596033239; cv=none; d=google.com; s=arc-20160816; b=IKG3OgFluf3q6SvCtJGWBkgXqQPy/d7XnJLrXvfOBh97AEiEEwC3SGyhcf2NRevfTo IDH1SqKu/s8TOY4mclN10Nm6xAM5dzQg3w28YBtl5eC0vqZTN7I43Rc2OMXPm7sxZhR2 ZW16P4dqtbuPhZwkSza8e1F9PBHh1b4EKQakou93IkyPw/tRpsgSZwFd5fcCdM3lbrlW +EroXhK3vOWk/HEelQiz6EkvQUq2jYJ9nhZ413neHnxnb/jLy3apfUaqHeoMwaZekk8r Y3QFGZDTi6STtks35+RGWSbdN0Mn/w9gG7WzEnFKr0zpqOT6tCe2sZwv4xf+1i6omu9r clEQ== 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; bh=kMlKqVpMYZrkq++S2RWxZ8THr8EJ0z+y5ejuGh6soGk=; b=JIylYqfZGdfxlmOMYxhU9NdT/wnRsx7JbVBK0lXvc+ChX1y6p1RYobXLcmrwrvp1HN qPXVBbW3Tj2+5bFC55TS37uDu2VTVLCfFUdBspy4qGtlGvw1WBrbiDY1V+uCGUlc0rVZ i7ozhzGQdDR/YbuXVrAX5n06F9L6u3ppHq3/nZQ2315z/AlftK8snlUCuZpIdHl+jBBZ KjwJyUWtetC8BkgzSsMJQVjsSdBzjE3ktRrM4wzWJdJxWvK3AZDlgoskkGp2kOzhKyz9 5zNPn9JGMxetuGA6hgizg1FDkxjPiAEaeGKlJAPNoTBZsDYwRQr+GDcg4r7c3fPAZ4LM J5ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=WnK6zVse; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n6si1341261ejz.524.2020.07.29.07.33.36; Wed, 29 Jul 2020 07:33:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=WnK6zVse; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726751AbgG2OdR (ORCPT + 99 others); Wed, 29 Jul 2020 10:33:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726496AbgG2OdQ (ORCPT ); Wed, 29 Jul 2020 10:33:16 -0400 Received: from mail-ej1-x644.google.com (mail-ej1-x644.google.com [IPv6:2a00:1450:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B2E6C0619D2 for ; Wed, 29 Jul 2020 07:33:16 -0700 (PDT) Received: by mail-ej1-x644.google.com with SMTP id g19so10778729ejc.9 for ; Wed, 29 Jul 2020 07:33:16 -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=kMlKqVpMYZrkq++S2RWxZ8THr8EJ0z+y5ejuGh6soGk=; b=WnK6zVseynpYShz7AuRIaVykQvUyr0PeVQ+YEYnugHbrxaPTg77BOqUSx+H2KBXM90 zw/paDsb8vkp0/OZUl2xs+7ygdSQRg4NI2g9Jwz4Fk10Twtc8cpCHx+S8Ap/7hExNtA6 Hu9L2x/lVBxvSXEjHdf6Pr0V7+zzd39waCyQTvSz6DPcpPdKsJP6tA48AihdTV2SmUeO HNJwe6HGBi6mFDaC0EZ7qT8yiGYcxvJBRgzvZ8XoUf7A4RZqwAaIkwBzssEXW6BQal5q /FMsF+6sAVsfK+X6uBrpfnNJlYdQSume74AVeI1gtosVjPYW1BUwpAaRsSJnStmGab3/ 5Yow== 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=kMlKqVpMYZrkq++S2RWxZ8THr8EJ0z+y5ejuGh6soGk=; b=cLJF7GRoG/ySWtbiIyRLMqIjSlEFIqXDxDI29ch1QfMYRAQ1ozCz1Fkj22J/J8cMIS FyIYEKAh3FBO+Xt7JpFToJ2Xru25h7ZuXHKya1A3Si5eHnV6jUwB1Vkw2w721vWCYGCx paA4GKN81JdP8Natz9Od1P03g8On+c4T14rOmTzZ+wGNXbnWOeLJhXrbnwYEWQglpVyD HERlSbByAShztrhgptUs1AZTL7bESnVEdIT1hUdOnrrMpx8OTZxQCwGLUgi4iRN4k8bf tRHbsIA1iFmW/FXDHpGbLreaZExUb94ycDWB7KL1yPemzePqRL725gIXGRvzq2Dll8pN OyhQ== X-Gm-Message-State: AOAM533TQi7o8i3mz7dcHx+jgjrveVsPjIxfhiU8Y0jqitHLBCWqzhdk uD9uIRwiH3VlAPkGdRY1x9wbKyFf30/v/HupJd60 X-Received: by 2002:a17:906:43c9:: with SMTP id j9mr14520051ejn.542.1596033194870; Wed, 29 Jul 2020 07:33:14 -0700 (PDT) MIME-Version: 1.0 References: <20200728162722.djvy3qyclj57wsfn@madcap2.tricolour.ca> <20200729020106.x5tfijvnxdmujtbj@madcap2.tricolour.ca> In-Reply-To: <20200729020106.x5tfijvnxdmujtbj@madcap2.tricolour.ca> From: Paul Moore Date: Wed, 29 Jul 2020 10:33:03 -0400 Message-ID: Subject: Re: [PATCH V3fix ghak120] audit: initialize context values in case of mandatory events To: Richard Guy Briggs Cc: Eric Paris , Linux Security Module list , Linux-Audit Mailing List , LKML 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 28, 2020 at 10:01 PM Richard Guy Briggs wrote: > > On 2020-07-28 14:47, Paul Moore wrote: > > On Tue, Jul 28, 2020 at 12:27 PM Richard Guy Briggs wrote: > > > I know you like only really minimal fixes this late, but this seemed > > > pretty minimal to me... > > > > Minimal is a one (two?) line NULL check in audit_log_name(), this > > patch is not that. > > I didn't try and test that since I'm not sure that would have worked > because there appeared to be a low non-NULL value in it. brauer1's trace had > 0x60 and mine had 0xd0. Or am I missing something obvious? Well, you mentioned the obvious already: both 0x60 and 0xd0 are not NULL. We already have a NULL check for context->pwd elsewhere so there is precedence for this solving a similar problem, although without going through the git log I'm not sure what problem that solved, or if it was precautionary. I agree the low value looks suspicious, it almost looks like an offset to me, ideally it would be good to understand how/why that value is "off'. It could be that the audit_context is not being properly initialized, reset, or something unrelated is clobbering the value; all things that would be nice to know. > The patch provided the information rather than ignoring the problem ... I disagree. -- paul moore www.paul-moore.com