Add wpa neverallow rule
wpa should never trust any data coming from the sdcard. Add a
compile time assertion to make sure no rules are ever added
allowing this access.
Change-Id: I5f50a8242aa30f6cc0cfd89d82b2b153625105f6
diff --git a/wpa.te b/wpa.te
index 7b1a875..d6fae63 100644
--- a/wpa.te
+++ b/wpa.te
@@ -37,3 +37,11 @@
userdebug_or_eng(`
unix_socket_send(wpa, wpa, su)
')
+
+###
+### neverallow rules
+###
+
+# wpa_supplicant should not trust any data from sdcards
+neverallow wpa sdcard_type:dir ~getattr;
+neverallow wpa sdcard_type:file *;