Skip to content
Snippets Groups Projects
  • Nick Kralevich's avatar
    allow apps tun_device ioctl TUNGETIFF; · 3b2df198
    Nick Kralevich authored
    Commit 619c1ef2 ("tun_device: enforce
    ioctl restrictions") completely removed the ability of untrusted apps to
    issue ioctl calls to tun_device. It turns out that this was too
    aggressive. Wireshark apparently uses the TUNGETIFF ioctl.
    
    Fixes the following denial:
    
    audit(0.0:384744): avc: denied { ioctl } for comm=4173796E635461736B202332 path="/dev/tun" dev="tmpfs" ino=19560 ioctlcmd=54d2 scontext=u:r:untrusted_app:s0:c51,c257,c512,c768 tcontext=u:object_r:tun_device:s0 tclass=chr_file permissive=1 app=com.wireguard.android
    
    Test: policy compiles.
    Change-Id: I71bb494036ea692781c00af37580748ab39d1332
    3b2df198