Created attachment 1650395 [details] excerpt of audit.log Description of problem: ganesha's current targeted policy was originally taken from rhel which was written for ganesha running as part of downstream RHGS (gluster). Now we are seeing more people running ganesha's FSAL_VFS using local disk as backing store instead of Gluster and are seeing AVC denials during its start-up when it scans all the local file systems. This is a necessary step that is required to implement NFSv4's Pseudo feature. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info: ganesha's current selinux policy files can be found at https://github.com/nfs-ganesha/nfs-ganesha/tree/next/src/selinux audit2allow output: $ cat /tmp/audit2allow.out #============= ganesha_t ============== allow ganesha_t apm_bios_t:chr_file getattr; allow ganesha_t autofs_device_t:chr_file getattr; allow ganesha_t bpf_t:dir getattr; allow ganesha_t bpf_t:filesystem getattr; allow ganesha_t cgroup_t:dir getattr; allow ganesha_t cgroup_t:filesystem getattr; allow ganesha_t clock_device_t:chr_file getattr; allow ganesha_t configfs_t:dir getattr; allow ganesha_t configfs_t:filesystem getattr; allow ganesha_t cpu_device_t:chr_file getattr; allow ganesha_t debugfs_t:filesystem getattr; allow ganesha_t device_t:chr_file getattr; allow ganesha_t device_t:filesystem getattr; allow ganesha_t devpts_t:filesystem getattr; allow ganesha_t dri_device_t:chr_file getattr; allow ganesha_t event_device_t:chr_file getattr; allow ganesha_t fixed_disk_device_t:blk_file { getattr ioctl open read }; allow ganesha_t fixed_disk_device_t:chr_file getattr; allow ganesha_t framebuf_device_t:chr_file getattr; allow ganesha_t fs_t:filesystem getattr; allow ganesha_t hugetlbfs_t:dir { getattr open read }; allow ganesha_t hugetlbfs_t:filesystem getattr; allow ganesha_t initctl_t:fifo_file getattr; #!!!! This avc can be allowed using the boolean 'domain_can_write_kmsg' allow ganesha_t kmsg_device_t:chr_file getattr; allow ganesha_t kvm_device_t:chr_file getattr; allow ganesha_t lvm_control_t:chr_file getattr; allow ganesha_t memory_device_t:chr_file getattr; allow ganesha_t mouse_device_t:chr_file getattr; allow ganesha_t netcontrol_device_t:chr_file getattr; allow ganesha_t nvram_device_t:chr_file getattr; allow ganesha_t proc_kcore_t:file getattr; allow ganesha_t proc_t:filesystem getattr; allow ganesha_t pstore_t:dir getattr; allow ganesha_t pstore_t:filesystem getattr; allow ganesha_t ptmx_t:chr_file getattr; allow ganesha_t removable_device_t:blk_file getattr; allow ganesha_t rpc_pipefs_t:dir getattr; allow ganesha_t rpc_pipefs_t:filesystem getattr; allow ganesha_t scsi_generic_device_t:chr_file getattr; allow ganesha_t sound_device_t:chr_file getattr; allow ganesha_t sysfs_t:dir read; allow ganesha_t sysfs_t:file { getattr open read }; allow ganesha_t sysfs_t:filesystem getattr; allow ganesha_t sysfs_t:lnk_file read; allow ganesha_t tmpfs_t:dir read; allow ganesha_t tmpfs_t:filesystem getattr; allow ganesha_t usb_device_t:chr_file getattr; allow ganesha_t usbmon_device_t:chr_file getattr; allow ganesha_t virtio_device_t:chr_file getattr; allow ganesha_t watchdog_device_t:chr_file getattr; allow ganesha_t xserver_misc_device_t:chr_file getattr; #============= init_t ============== allow init_t ganesha_var_log_t:dir setattr; allow init_t var_lib_nfs_t:dir create; #============= rpcbind_t ============== #!!!! This avc can be allowed using the boolean 'nis_enabled' allow rpcbind_t unreserved_port_t:udp_socket name_bind;
*** Bug 1788542 has been marked as a duplicate of this bug. ***
Would appreciate some help with this. Please review my proposed changes at https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/483661 Thanks
FEDORA-2020-07bb9bdfaa has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2020-07bb9bdfaa
selinux-policy-3.14.4-47.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-07bb9bdfaa
selinux-policy-3.14.4-47.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.
I don't see any change in selinux-policy-3.14.4-47.fc31 (relative to selinux-policy-3.14.4-46.fc31) that seems applicable to this. After updating to selinux-policy-3.14.4-47.fc31 I still get the same AVCs I saw before. Can you please comment on the patch I posted to ganesha's selinux policy (see Comment #2) either in the patch or here. Thanks
Changing bugs in the POST state is a part of the workflow, switching to ASSIGNED.
This message is a reminder that Fedora 31 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 31 on 2020-11-24. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '31'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 31 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 31 changed to end-of-life (EOL) status on 2020-11-24. Fedora 31 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.