Allow all Apps to Recv UDP Sockets from SystemServer

Access to this functionality is gated elsewhere e.g. by
allowing/disallowing access to the service.

Bug: 237512474
Test: IpSecManagerTest
Test: Manual with GMSCore + PPN library
Change-Id: Ibb00b7c470a4cb148cfdcfb6b147edde45e49b1a
diff --git a/private/app.te b/private/app.te
index 7033cb6..269609a 100644
--- a/private/app.te
+++ b/private/app.te
@@ -44,6 +44,11 @@
 # Access to /mnt/media_rw/<vol> (limited by DAC to apps with external_storage gid)
 allow { appdomain -sdk_sandbox } mnt_media_rw_file:dir search;
 
+# allow apps to use UDP sockets provided by the system server but not
+# modify them other than to connect
+allow appdomain system_server:udp_socket {
+        connect getattr read recvfrom sendto write getopt setopt };
+
 neverallow appdomain system_server:udp_socket {
         accept append bind create ioctl listen lock name_bind
         relabelfrom relabelto setattr shutdown };