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

MongoDB 6.0 + mongodb-selinux

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • ALL
    • Hide

      Upgrade MongoDB 5.0 to 6.0 as per the documentation.

      Show
      Upgrade MongoDB 5.0 to 6.0 as per the documentation.
    • Security 2022-08-22, Security 2022-09-05

      Hi.

      This relates to https://www.mongodb.com/community/forums/t/mongodb-6-0-and-selinux/180756.

       

      We are testing an upgrade of MongoDB 5.0 to MongoDB 6.0 on Rocky Linux 8, using the revised SELinux instructions:

      https://www.mongodb.com/docs/v6.0/tutorial/install-mongodb-on-red-hat/#configure-selinux
       
      Having removed the old policies and installed the new policies from mongodb-selinux, we are getting one denial:

      type=PROCTITLE msg=audit(1660560763.000:4626): proctitle=2F7573722F62696E2F6D6F6E676F64002D66002F6574632F6D6F6E676F642E636F6E66
      type=PATH msg=audit(1660560763.000:4626): 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(1660560763.000:4626): cwd="/"
      type=SYSCALL msg=audit(1660560763.000:4626): arch=c000003e syscall=137 success=no exit=-13 a0=55c721f04d00 a1=7f0f3c107000 a2=7f0f3c1071c0 a3=0 items=1 ppid=1 pid=3065 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(1660560763.000:4626): avc:  denied  { search } for  pid=3065 comm="ftdc" name="fs" dev="proc" ino=315 scontext=system_u:system_r:mongod_t:s0 tcontext=system_u:object_r:sysctl_fs_t:s0 tclass=dir permissive=0 

      I can't see anything in mongodb-selinux that grants:

      allow mongod_t sysctl_fs_t:dir search; 

      like the old "mongodb_proc_net" policy used to.

       

      Should this be included (i.e. it's a bug in the policy), or do we need to manually add a policy ourselves?

       

      Thanks.

            Assignee:
            sergey.galtsev@mongodb.com Sergey Galtsev (Inactive)
            Reporter:
            third.line@invade.net INVADE International Ltd
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: