hal_configstore.te 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. # HwBinder IPC from client to server
  2. binder_call(hal_configstore_client, hal_configstore_server)
  3. hal_attribute_hwservice(hal_configstore, hal_configstore_ISurfaceFlingerConfigs)
  4. # hal_configstore runs with a strict seccomp filter. Use crash_dump's
  5. # fallback path to collect crash data.
  6. crash_dump_fallback(hal_configstore_server)
  7. ###
  8. ### neverallow rules
  9. ###
  10. # Should never execute an executable without a domain transition
  11. neverallow hal_configstore_server { file_type fs_type }:file execute_no_trans;
  12. # Should never need network access. Disallow sockets except for
  13. # for unix stream/dgram sockets used for logging/debugging.
  14. neverallow hal_configstore_server domain:{
  15. rawip_socket tcp_socket udp_socket
  16. netlink_route_socket netlink_selinux_socket
  17. socket netlink_socket packet_socket key_socket appletalk_socket
  18. netlink_tcpdiag_socket netlink_nflog_socket
  19. netlink_xfrm_socket netlink_audit_socket
  20. netlink_dnrt_socket netlink_kobject_uevent_socket tun_socket
  21. netlink_iscsi_socket netlink_fib_lookup_socket netlink_connector_socket
  22. netlink_netfilter_socket netlink_generic_socket netlink_scsitransport_socket
  23. netlink_rdma_socket netlink_crypto_socket
  24. } *;
  25. neverallow hal_configstore_server {
  26. domain
  27. -hal_configstore_server
  28. -logd
  29. userdebug_or_eng(`-su')
  30. -tombstoned
  31. userdebug_or_eng(`-heapprofd')
  32. }:{ unix_dgram_socket unix_stream_socket } *;
  33. # Should never need access to anything on /data
  34. neverallow hal_configstore_server {
  35. data_file_type
  36. -anr_data_file # for crash dump collection
  37. -tombstone_data_file # for crash dump collection
  38. -zoneinfo_data_file # granted to domain
  39. with_native_coverage(`-method_trace_data_file')
  40. }:{ file fifo_file sock_file } *;
  41. # Should never need sdcard access
  42. neverallow hal_configstore_server {
  43. sdcard_type
  44. fuse sdcardfs vfat exfat # manual expansion for completeness
  45. }:dir ~getattr;
  46. neverallow hal_configstore_server {
  47. sdcard_type
  48. fuse sdcardfs vfat exfat # manual expansion for completeness
  49. }:file *;
  50. # Do not permit access to service_manager and vndservice_manager
  51. neverallow hal_configstore_server *:service_manager *;
  52. # No privileged capabilities
  53. neverallow hal_configstore_server self:capability_class_set *;
  54. # No ptracing other processes
  55. neverallow hal_configstore_server *:process ptrace;
  56. # no relabeling
  57. neverallow hal_configstore_server *:dir_file_class_set { relabelfrom relabelto };