Skip to content
Snippets Groups Projects
  1. Apr 11, 2018
    • Jeff Vander Stoep's avatar
      Suppress spurious denial · f7a7f7d1
      Jeff Vander Stoep authored
      Addresses:
      avc: denied { sys_resource } for comm="ip6tables" capability=24
      scontext=u:r:netutils_wrapper:s0 tcontext=u:r:netutils_wrapper:s0
      tclass=capability
      
      Bug: 77905989
      Test: build and flash taimen-userdebug
      Change-Id: Ic5d7c96152b96b55255eeec00b19948f38c1923c
      (cherry picked from commit 443a43c9)
      f7a7f7d1
    • Jeff Vander Stoep's avatar
      Suppress spurious denial · 443a43c9
      Jeff Vander Stoep authored
      Addresses:
      avc: denied { sys_resource } for comm="ip6tables" capability=24
      scontext=u:r:netutils_wrapper:s0 tcontext=u:r:netutils_wrapper:s0
      tclass=capability
      
      Bug: 77905989
      Test: build and flash taimen-userdebug
      Change-Id: Ic5d7c96152b96b55255eeec00b19948f38c1923c
      443a43c9
  2. Apr 10, 2018
    • Jeff Vander Stoep's avatar
      Start the process of locking down proc/net · 08731895
      Jeff Vander Stoep authored
      Files in /proc/net leak information. This change is the first step in
      determining which files apps may use, whitelisting benign access, and
      otherwise removing access while providing safe alternative APIs.
      
      To that end, this change:
      * Introduces the proc_net_type attribute which will assigned to any
      new SELinux types in /proc/net to avoid removing access to privileged
      processes. These processes may be evaluated later, but are lower
      priority than apps.
      * Labels /proc/net/{tcp,tcp6,udp,udp6} as proc_net_vpn due to existing
      use by VPN apps. This may be replaced by an alternative API.
      * Audits all other proc/net access for apps.
      * Audits proc/net access for other processes which are currently
      granted broad read access to /proc/net but should not be including
      storaged, zygote, clatd, logd, preopt2cachename and vold.
      
      Bug: 9496886
      Bug: 68016944
      Test: Boot Taimen-userdebug. On both wifi and cellular: stream youtube
          navigate maps, send text message, make voice call, make video call.
          Verify no avc "granted" messages in the logs.
      Test: A few VPN apps including "VPN Monster", "Turbo VPN", and
      "Freighter". Verify no logspam with the current setup.
      Test: atest CtsNativeNetTestCases
      Test: atest netd_integration_test
      Test: atest QtaguidPermissionTest
      Test: atest FileSystemPermissionTest
      
      Change-Id: I7e49f796a25cf68bc698c6c9206e24af3ae11457
      08731895
  3. Mar 30, 2018
    • Chenbo Feng's avatar
      Allow netutils_wrapper to use pinned bpf program · be9b15c5
      Chenbo Feng authored
      The netutils_wrapper is a process used by vendor code to update the
      iptable rules on devices. When it update the rules for a specific chain.
      The iptable module will reload the whole chain with the new rule. So
      even the netutils_wrapper do not need to add any rules related to xt_bpf
      module, it will still reloading the existing iptables rules about xt_bpf
      module and need pass through the selinux check again when the rules are
      reloading. So we have to grant it the permission to reuse the pinned
      program in fs_bpf when it modifies the corresponding iptables chain so
      the vendor module will not crash anymore.
      
      Test: device boot and no more denials from netutils_wrapper
      Bug: 72111305
      Change-Id: I62bdfd922c8194c61b13e2855839aee3f1e349be
      (cherry picked from aosp commit 2623ebcf)
      be9b15c5
  4. Mar 29, 2018
    • Chenbo Feng's avatar
      Allow netutils_wrapper to use pinned bpf program · 2623ebcf
      Chenbo Feng authored
      The netutils_wrapper is a process used by vendor code to update the
      iptable rules on devices. When it update the rules for a specific chain.
      The iptable module will reload the whole chain with the new rule. So
      even the netutils_wrapper do not need to add any rules related to xt_bpf
      module, it will still reloading the existing iptables rules about xt_bpf
      module and need pass through the selinux check again when the rules are
      reloading. So we have to grant it the permission to reuse the pinned
      program in fs_bpf when it modifies the corresponding iptables chain so
      the vendor module will not crash anymore.
      
      Test: device boot and no more denials from netutils_wrapper
      Bug: 72111305
      Change-Id: I62bdfd922c8194c61b13e2855839aee3f1e349be
      2623ebcf
  5. Nov 21, 2017
    • Benjamin Gordon's avatar
      sepolicy: Add rules for non-init namespaces · 9b2e0cbe
      Benjamin Gordon authored
      In kernel 4.7, the capability and capability2 classes were split apart
      from cap_userns and cap2_userns (see kernel commit
      8e4ff6f228e4722cac74db716e308d1da33d744f). Since then, Android cannot be
      run in a container with SELinux in enforcing mode.
      
      This change applies the existing capability rules to user namespaces as
      well as the root namespace so that Android running in a container
      behaves the same on pre- and post-4.7 kernels.
      
      This is essentially:
        1. New global_capability_class_set and global_capability2_class_set
           that match capability+cap_userns and capability2+cap2_userns,
           respectively.
        2. s/self:capability/self:global_capability_class_set/g
        3. s/self:capability2/self:global_capability2_class_set/g
        4. Add cap_userns and cap2_userns to the existing capability_class_set
           so that it covers all capabilities.  This set was used by several
           neverallow and dontaudit rules, and I confirmed that the new
           classes are still appropriate.
      
      Test: diff new policy against old and confirm that all new rules add
            only cap_userns or cap2_userns;
            Boot ARC++ on a device with the 4.12 kernel.
      Bug: crbug.com/754831
      
      Change-Id: I4007eb3a2ecd01b062c4c78d9afee71c530df95f
      9b2e0cbe
  6. Apr 15, 2017
Loading