Skip to contentSkip to conversation

Improve domain_transition_pattern to allow mmap entrypoint bin file.

PATCH New Lukas Vrabec 2 participants 2 messages Jul 19, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Improve domain_transition_pattern to allow mmap entrypoint bin file.

In domain_transition_pattern there is rule:
allow $1 $2:file { getattr open read execute };

map permission is missing here, which is generating lot of AVC. Replacing permissions with mmap_exec_file_perms set.

---
 policy/support/misc_patterns.spt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
policy/support/misc_patterns.spt +1 -1
index 26a86dda..2cfa0313 100644
@@ -7,7 +7,7 @@
 # 3. target domain
 #
 define(`domain_transition_pattern',`
-	allow $1 $2:file { getattr open read execute };
+	allow $1 $2:file { mmap_exec_file_perms };
 	allow $1 $3:process transition;
 	dontaudit $1 $3:process { noatsecure siginh rlimitinh };
 ')
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 Improve domain_transition_pattern to allow mmap entrypoint bin file.

Quoted 14 lines · Lukas Vrabec via refpolicy

In domain_transition_pattern there is rule:
allow $1 $2:file { getattr open read execute };

map permission is missing here, which is generating lot of AVC. Replacing permissions with mmap_exec_file_perms set.

---
  policy/support/misc_patterns.spt | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
policy/support/misc_patterns.spt +0 -0
index 26a86dda..2cfa0313 100644

policy/support/misc_patterns.spt line 13

Quoted 8 lines
policy/support/misc_patterns.spt +1 -1
@@ -7,7 +7,7 @@
  # 3. target domain
  #
  define(`domain_transition_pattern',`
-	allow $1 $2:file { getattr open read execute };
+	allow $1 $2:file { mmap_exec_file_perms };
  	allow $1 $3:process transition;
  	dontaudit $1 $3:process { noatsecure siginh rlimitinh };
  ')

Merged.

Signature · 1 line
Chris PeBenito