From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B5AEAC54EBC for ; Tue, 10 Jan 2023 15:26:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673364367; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Ka5wZanGrNvmUQrQ/0PYsO3n4YHAwJJ2zbezOKaiAlA=; b=WoEdTHXl5Q4OzG/k9JhocVDuDO/Cc4za0d7HBacNhA6elhvYcyIy+KcuLq4s9EUbXs0qyu 028PemAiq3MsT5BupvsF83I7O+Z09qaPRBKWyxFFJqhpNw0sHP1t/diXx9xp7C0c2KQYK7 4aKsbhEhCAtAKzwFP4NF71QFs2Q6I2k= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-414-HSoXmLxbPeSBjhT7OgjKVQ-1; Tue, 10 Jan 2023 10:26:04 -0500 X-MC-Unique: HSoXmLxbPeSBjhT7OgjKVQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0DCFD29AB405; Tue, 10 Jan 2023 15:26:03 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id CC440C16031; Tue, 10 Jan 2023 15:26:02 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id B7B3C194E115; Tue, 10 Jan 2023 15:26:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id BA3691946587 for ; Tue, 10 Jan 2023 15:26:01 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 65C941121318; Tue, 10 Jan 2023 15:26:01 +0000 (UTC) Received: from x2.localnet (unknown [10.22.9.158]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C58831121314; Tue, 10 Jan 2023 15:26:00 +0000 (UTC) From: Steve Grubb To: Richard Guy Briggs Subject: Re: [PATCH v5 3/3] fanotify, audit: Allow audit to use the full permission event response Date: Tue, 10 Jan 2023 10:26:00 -0500 Message-ID: <4778109.GXAFRqVoOG@x2> Organization: Red Hat In-Reply-To: References: <3211441.aeNJFYEL58@x2> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-BeenThere: linux-audit@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Audit Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jan Kara , linux-api@vger.kernel.org, Amir Goldstein , LKML , Linux-Audit Mailing List , linux-fsdevel@vger.kernel.org, Eric Paris Errors-To: linux-audit-bounces@redhat.com Sender: "Linux-audit" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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. -Steve -- Linux-audit mailing list Linux-audit@redhat.com https://listman.redhat.com/mailman/listinfo/linux-audit