summaryrefslogtreecommitdiffstats
path: root/recipes-security/refpolicy/refpolicy/0078-policy-modules-system-systemd-systemd-gpt-auto-gener.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-security/refpolicy/refpolicy/0078-policy-modules-system-systemd-systemd-gpt-auto-gener.patch')
-rw-r--r--recipes-security/refpolicy/refpolicy/0078-policy-modules-system-systemd-systemd-gpt-auto-gener.patch70
1 files changed, 70 insertions, 0 deletions
diff --git a/recipes-security/refpolicy/refpolicy/0078-policy-modules-system-systemd-systemd-gpt-auto-gener.patch b/recipes-security/refpolicy/refpolicy/0078-policy-modules-system-systemd-systemd-gpt-auto-gener.patch
new file mode 100644
index 0000000..303e7cf
--- /dev/null
+++ b/recipes-security/refpolicy/refpolicy/0078-policy-modules-system-systemd-systemd-gpt-auto-gener.patch
@@ -0,0 +1,70 @@
1From 84b86b1a4dd6f8e535c4b9b4ac2bfa38d202d9d3 Mon Sep 17 00:00:00 2001
2From: Yi Zhao <yi.zhao@windriver.com>
3Date: Tue, 23 Jun 2020 14:52:43 +0800
4Subject: [PATCH] policy/modules/system/systemd: systemd-gpt-auto-generator:
5 make systemd_generator_t MLS trusted for writing from files up to its
6 clearance
7
8Fixes:
9audit: type=1400 audit(1592892455.376:3): avc: denied { write } for
10pid=120 comm="systemd-gpt-aut" name="kmsg" dev="devtmpfs" ino=10032
11scontext=system_u:system_r:systemd_generator_t:s0-s15:c0.c1023
12tcontext=system_u:object_r:kmsg_device_t:s15:c0.c1023 tclass=chr_file
13permissive=0
14audit: type=1400 audit(1592892455.381:4): avc: denied { write } for
15pid=119 comm="systemd-getty-g" name="kmsg" dev="devtmpfs" ino=10032
16scontext=system_u:system_r:systemd_generator_t:s0-s15:c0.c1023
17tcontext=system_u:object_r:kmsg_device_t:s15:c0.c1023 tclass=chr_file
18permissive=0
19audit: type=1400 audit(1592892455.382:5): avc: denied { read write }
20for pid=119 comm="systemd-getty-g" name="ttyS0" dev="devtmpfs"
21ino=10127 scontext=system_u:system_r:systemd_generator_t:s0-s15:c0.c1023
22tcontext=system_u:object_r:tty_device_t:s0 tclass=chr_file permissive=0
23audit: type=1400 audit(1592892455.382:6): avc: denied { write } for
24pid=124 comm="systemd-system-" name="kmsg" dev="devtmpfs" ino=10032
25scontext=system_u:system_r:systemd_generator_t:s0-s15:c0.c1023
26tcontext=system_u:object_r:kmsg_device_t:s15:c0.c1023 tclass=chr_file
27permissive=0
28audit: type=1400 audit(1592892455.383:7): avc: denied { write } for
29pid=122 comm="systemd-rc-loca" name="kmsg" dev="devtmpfs" ino=10032
30scontext=system_u:system_r:systemd_generator_t:s0-s15:c0.c1023
31tcontext=system_u:object_r:kmsg_device_t:s15:c0.c1023 tclass=chr_file
32permissive=0
33audit: type=1400 audit(1592892455.385:8): avc: denied { write } for
34pid=118 comm="systemd-fstab-g" name="kmsg" dev="devtmpfs" ino=10032
35scontext=system_u:system_r:systemd_generator_t:s0-s15:c0.c1023
36tcontext=system_u:object_r:kmsg_device_t:s15:c0.c1023 tclass=chr_file
37permissive=0
38audit: type=1400 audit(1592892455.385:9): avc: denied { write } for
39pid=121 comm="systemd-hiberna" name="kmsg" dev="devtmpfs" ino=10032
40scontext=system_u:system_r:systemd_generator_t:s0-s15:c0.c1023
41tcontext=system_u:object_r:kmsg_device_t:s15:c0.c1023 tclass=chr_file
42permissive=0
43audit: type=1400 audit(1592892455.386:10): avc: denied { write } for
44pid=123 comm="systemd-run-gen" name="kmsg" dev="devtmpfs" ino=10032
45scontext=system_u:system_r:systemd_generator_t:s0-s15:c0.c1023
46tcontext=system_u:object_r:kmsg_device_t:s15:c0.c1023 tclass=chr_file
47permissive=0
48
49Upstream-Status: Inappropriate [embedded specific]
50
51Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
52---
53 policy/modules/system/systemd.te | 1 +
54 1 file changed, 1 insertion(+)
55
56diff --git a/policy/modules/system/systemd.te b/policy/modules/system/systemd.te
57index e82a1e64a..7e573645b 100644
58--- a/policy/modules/system/systemd.te
59+++ b/policy/modules/system/systemd.te
60@@ -401,6 +401,7 @@ storage_raw_read_fixed_disk(systemd_generator_t)
61 systemd_log_parse_environment(systemd_generator_t)
62
63 term_dontaudit_use_unallocated_ttys(systemd_generator_t)
64+mls_file_write_to_clearance(systemd_generator_t)
65
66 optional_policy(`
67 fstools_exec(systemd_generator_t)
68--
692.17.1
70