Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp8259992rwl; Tue, 10 Jan 2023 11:00:30 -0800 (PST) X-Google-Smtp-Source: AMrXdXvxMXV/1kmvO8q9DLZQ+nqvcUJYKKc7YNlyu9BeblctCgRk+l648HXuBoBfx2cdPPoKEa9t X-Received: by 2002:aa7:c597:0:b0:499:b53f:1c56 with SMTP id g23-20020aa7c597000000b00499b53f1c56mr6963723edq.38.1673377230450; Tue, 10 Jan 2023 11:00:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673377230; cv=none; d=google.com; s=arc-20160816; b=EnRbQRE+NB2Z+R7b3mzKpE7Zob3NJ3rf2/wfFkWj6DdYgn41I/6dLHk6QkJnNjBdin vEjmlbRwwzk0n7sHfXgb5KhCWAeQHd4M/UPHNsU6u8Bo02LmjRM+9uY7ulGK/FJldP4u TbOs8JsqMLvCsjr1Rhn+naa4LKR8kg7Ks3WXeH/vSisi1kIPjof/IFwFt+mYt9jEE3zd tUr9shzSlc7TmTazr8WX7UPm77f2ElzXcJf1XqGH2SgQH0oEnmXhXnf5BgY+B94Uo0Kn /PgB0PJtNMysWzQxQLZpzcAkGYJjS7dPqge4zH5W2Q5GRa4FNFloWCfY8lJB2OpZjD8h h3jA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=isX/xl/Gk4O2RcsWO9IXu2O1CLN73hFphddfEk/12nc=; b=fcjVPiEEILVgbQWaUSimalTZAVi5sLi33jWIQN90Dz+4CRumQXHbkBDm7pTqUlcIh0 RD2cPwGXolwiB4IfXrC2jHEvqQu55v02yzfkEEeEKITebbn5lbJhm3ZdWS3+h1OZ+9Cj frSCriKHr7BfKyfqDS86IaDlGsiZLN4bIF6vDzz2pZCSG/fQctDqRamMTGlgtKMaY0tk DZ4oYH9AKUpoC1MCQZReJH8HJ1itmKSuwFbSxRXXhZ2OsYX1oZv+TAHc0sS8Hn0id0fK 2VqFmsfCJC6vCw+lgN8j/e1FzcNNYpqrfbk0SxeAOgqUhf+ehN1kYSc0Ac3RyXiLcHqy uj8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LBAWLrNp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b11-20020a056402084b00b0046bc9cbd8f0si14552254edz.504.2023.01.10.11.00.17; Tue, 10 Jan 2023 11:00:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LBAWLrNp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239626AbjAJSjW (ORCPT + 53 others); Tue, 10 Jan 2023 13:39:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239465AbjAJSiO (ORCPT ); Tue, 10 Jan 2023 13:38:14 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 233C05B4B5 for ; Tue, 10 Jan 2023 10:32:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673375566; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=isX/xl/Gk4O2RcsWO9IXu2O1CLN73hFphddfEk/12nc=; b=LBAWLrNpJ1AYLWDVrsaBRYvLvZA/8oBNRIqkDV2OthGb8pcLBef+4HmpgulxcqnD6pC16m MBVKPWf+mKTY8W5d6DwoKbDRH+iLj5CyNXYOwInHdHnaPIiYw5zrea6IJrjmY8443I+xbK c/vtmMqfO92zYfOUgM7BXqHOM6hgIVM= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-538-CeJyOlZoPEOV_EaDDCckkQ-1; Tue, 10 Jan 2023 13:32:44 -0500 X-MC-Unique: CeJyOlZoPEOV_EaDDCckkQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id ED2F8811E9C; Tue, 10 Jan 2023 18:32:43 +0000 (UTC) Received: from madcap2.tricolour.ca (ovpn-0-3.rdu2.redhat.com [10.22.0.3]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B3EF0492B00; Tue, 10 Jan 2023 18:32:42 +0000 (UTC) Date: Tue, 10 Jan 2023 13:32:40 -0500 From: Richard Guy Briggs To: Steve Grubb Cc: Jan Kara , linux-api@vger.kernel.org, Amir Goldstein , LKML , Linux-Audit Mailing List , linux-fsdevel@vger.kernel.org, Eric Paris Subject: Re: [PATCH v5 3/3] fanotify, audit: Allow audit to use the full permission event response Message-ID: References: <3211441.aeNJFYEL58@x2> <4778109.GXAFRqVoOG@x2> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4778109.GXAFRqVoOG@x2> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023-01-10 10:26, Steve Grubb wrote: > Hello Richard, > > On Monday, January 9, 2023 10:08:04 PM EST Richard Guy Briggs wrote: > > When I use an application that expected the old API, meaning it simply > > does: > > > > > > response.fd = metadata->fd; > > > response.response = reply; > > > close(metadata->fd); > > > write(fd, &response, sizeof(struct fanotify_response)); > > > > > > I get access denials. Every time. If the program is using the new API and > > > sets FAN_INFO, then it works as expected. I'll do some more testing but I > > > think there is something wrong in the compatibility path. > > > > I'll have a closer look, because this wasn't the intended behaviour. > > I have done more testing. I think what I saw might have been caused by a > stale selinux label (label exists, policy is deleted). With selinux in > permissive mode it's all working as expected - both old and new API. Ah good, thank you. > -Steve - 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