Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-63209

SELinux denials following update from 5.0.5 to 5.0.6

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 5.0.6
    • Component/s: None
    • None
    • ALL
    • Hide
      1. Install 5.0.5 on EL8 (in our case, Rocky Linux 8) as per:
        https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat/
      2. Upgrade the mongodb-org packages to 5.0.6.
      3. Restart the mongod.service unit.
      4. Check the audit log for SELinux denials.
      Show
      Install 5.0.5 on EL8 (in our case, Rocky Linux 8) as per: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat/ Upgrade the mongodb-org packages to 5.0.6. Restart the mongod.service unit. Check the audit log for SELinux denials.

      The following SELinux denial is logged every second:

      time->Wed Feb  2 15:27:09 2022
      type=PROCTITLE msg=audit(1643815629.001:19985): proctitle=2F7573722F62696E2F6D6F6E676F64002D66002F6574632F6D6F6E676F642E636F6E66
      type=PATH msg=audit(1643815629.001:19985): item=0 name="/proc/sys/fs/binfmt_misc" nametype=UNKNOWN cap_fp=0 cap_fi=0 cap_fe=0 cap_fver=0 cap_frootid=0
      type=CWD msg=audit(1643815629.001:19985): cwd="/"
      type=SYSCALL msg=audit(1643815629.001:19985): arch=c000003e syscall=137 success=no exit=-13 a0=55cd824fbb40 a1=7f24447c7dc0 a2=7f24447c7fa0 a3=0 items=1 ppid=1 pid=45608 auid=4294967295 uid=993 gid=990 euid=993 suid=993 fsuid=993 egid=990 sgid=990 fsgid=990 tty=(none) ses=4294967295 comm="ftdc" exe="/usr/bin/mongod" subj=system_u:system_r:mongod_t:s0 key=(null)
      type=AVC msg=audit(1643815629.001:19985): avc:  denied  { search } for  pid=45608 comm="ftdc" name="fs" dev="proc" ino=10475 scontext=system_u:system_r:mongod_t:s0 tcontext=system_u:object_r:sysctl_fs_t:s0 tclass=dir permissive=0

      suggesting the following needs to be granted:

      allow mongod_t sysctl_fs_t:dir search;

      This is not listed in:

      https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat/#configure-selinux

            Assignee:
            edwin.zhou@mongodb.com Edwin Zhou
            Reporter:
            third.line@invade.net INVADE International Ltd
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: