Bug 2008229

Summary: FANOTIFY - add reason code to audit event
Product: Red Hat Enterprise Linux 9 Reporter: Steve Grubb <sgrubb>
Component: kernelAssignee: Richard Guy Briggs <rbriggs>
kernel sub component: Audit QA Contact: Dennis(Zhuoheng) Li <denli>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: dapospis, denli, esandeen, lilu, mtguarnera, rbriggs, rsroka
Version: 9.0Keywords: Triaged
Target Milestone: rc   
Target Release: 9.3   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kernel-5.14.0-331.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2055328 (view as bug list) Environment:
Last Closed: 2023-11-07 08:38:46 UTC Type: Feature Request
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2055328    

Description Steve Grubb 2021-09-27 15:58:22 UTC
Description of problem:
Fapolicyd needs to be able to send a reason code to the audit system when it denies access. This is to aid policy writers in understanding why something was denied. This will make it easier to refine policy so that it's working correctly.

The tricky part is that the FANOTIFY API only has a single 32 bit integer to communicate through. The main idea would be to turn this from a 0 or 1 response into a bit mapped response where some bits are used for the yes/no answer and other bits are used to give context about the answer.

In order to make this flexible so that other users of FANOTIFY can use it for their purposes, some bits should be assigned for context type and others for the reason. Fapolicyd will define the first one to mean rule number.

When this was sent upstream the first time, they asked for the 32 bit response to be broken up into two 16 bit unsigned integers.

Additional info:
This needs coordination with the linux-audit community.

Comment 3 Richard Guy Briggs 2022-05-17 01:43:18 UTC
2020-09-30: v1 posted upstream: https://lore.kernel.org/r/2042449.irdbgypaU6@x2
2022-04-28: v2 posted upstream: https://lore.kernel.org/r/cover.1651174324.git.rgb@redhat.com
2022-05-16: v3 posted upstream: https://lore.kernel.org/r/cover.1652724390.git.rgb@redhat.com

Comment 4 Richard Guy Briggs 2022-08-09 20:16:09 UTC
 post v4 upstream https://lore.kernel.org/r/cover.1659981772.git.rgb@redhat.com

Comment 7 Richard Guy Briggs 2023-02-08 20:10:14 UTC
2022-12-12 v5 Link: https://lore.kernel.org/all/cover.1670606054.git.rgb@redhat.com

2023-01-17 v6 Link: https://lore.kernel.org/all/cover.1673989212.git.rgb@redhat.com

2023-02-03 v7 Link: https://lore.kernel.org/all/cover.1675373475.git.rgb@redhat.com

2023-02-07 Going upstream via linux-fsdevel Jan Kara <jack>

Comment 9 RHEL Program Management 2023-03-27 07:28:04 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.

Comment 10 Richard Guy Briggs 2023-03-27 11:46:44 UTC
In process, issued draft MR 2138 for centos stream 9

Comment 29 errata-xmlrpc 2023-11-07 08:38:46 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: kernel security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:6583