Skip to content
Snippets Groups Projects
  • Nick Kralevich's avatar
    92e79e22
    Add SIOCGSTAMP SIOCGSTAMPNS to unpriv_sock_ioctls · 92e79e22
    Nick Kralevich authored
    Per "man socket":
    
      SIOCGSTAMP
      Return a struct timeval with the receive timestamp of the last packet
      passed to the user. This is useful for accurate round trip time
      measurements. See setitimer(2) for a description of struct timeval.
      This ioctl should only be used if the socket option SO_TIMESTAMP is
      not set on the socket. Otherwise, it returns the timestamp of the last
      packet that was received while SO_TIMESTAMP was not set, or it fails
      if no such packet has been received, (i.e., ioctl(2) returns -1 with
      errno set to ENOENT).
    
    Addresses the following denial:
    
    avc: denied { ioctl } for comm=6E6574776F726B5F74687265616420
    path="socket:[42934]" dev="sockfs" ino=42934 ioctlcmd=8906
    scontext=u:r:untrusted_app:s0:c512,c768
    tcontext=u:r:untrusted_app:s0:c512,c768 tclass=udp_socket permissive=0
    
    Bug: 29333189
    Change-Id: I916a695fa362cf1cf6759629c7f6101e9f657e7d
    92e79e22
    History
    Add SIOCGSTAMP SIOCGSTAMPNS to unpriv_sock_ioctls
    Nick Kralevich authored
    Per "man socket":
    
      SIOCGSTAMP
      Return a struct timeval with the receive timestamp of the last packet
      passed to the user. This is useful for accurate round trip time
      measurements. See setitimer(2) for a description of struct timeval.
      This ioctl should only be used if the socket option SO_TIMESTAMP is
      not set on the socket. Otherwise, it returns the timestamp of the last
      packet that was received while SO_TIMESTAMP was not set, or it fails
      if no such packet has been received, (i.e., ioctl(2) returns -1 with
      errno set to ENOENT).
    
    Addresses the following denial:
    
    avc: denied { ioctl } for comm=6E6574776F726B5F74687265616420
    path="socket:[42934]" dev="sockfs" ino=42934 ioctlcmd=8906
    scontext=u:r:untrusted_app:s0:c512,c768
    tcontext=u:r:untrusted_app:s0:c512,c768 tclass=udp_socket permissive=0
    
    Bug: 29333189
    Change-Id: I916a695fa362cf1cf6759629c7f6101e9f657e7d