diff --git a/isolated_app.te b/isolated_app.te
index 6497cf1628422341eb8417afc74e1533327716e3..05c4ac50ae4c7df1f1f61362512c7cd695d1d6f2 100644
--- a/isolated_app.te
+++ b/isolated_app.te
@@ -40,6 +40,12 @@ neverallow isolated_app property_type:property_service set;
 # Isolated apps should not directly open app data files themselves.
 neverallow isolated_app app_data_file:file open;
 
+# Only allow appending to /data/anr/traces.txt (b/27853304, b/18340553)
+# TODO: are there situations where isolated_apps write to this file?
+# TODO: should we tighten these restrictions further?
+neverallow isolated_app anr_data_file:file ~{ open append };
+neverallow isolated_app anr_data_file:dir ~search;
+
 # b/17487348
 # Isolated apps can only access three services,
 # activity_service, display_service and webviewupdate_service.
diff --git a/untrusted_app.te b/untrusted_app.te
index d4d90ccf6a8970849a546030ff7aae95aadcc663..7e5d3935709f58a6cd8f5081c1aa1399036c5aed 100644
--- a/untrusted_app.te
+++ b/untrusted_app.te
@@ -185,3 +185,7 @@ neverallow untrusted_app {
 
 # Do not allow untrusted_app to directly open tun_device
 neverallow untrusted_app tun_device:chr_file open;
+
+# Only allow appending to /data/anr/traces.txt (b/27853304, b/18340553)
+neverallow untrusted_app anr_data_file:file ~{ open append };
+neverallow untrusted_app anr_data_file:dir ~search;