summaryrefslogtreecommitdiffstats
path: root/recipes-security/refpolicy/refpolicy/0039-policy-modules-services-bluetooth-allow-bluetooth_t-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-security/refpolicy/refpolicy/0039-policy-modules-services-bluetooth-allow-bluetooth_t-.patch')
-rw-r--r--recipes-security/refpolicy/refpolicy/0039-policy-modules-services-bluetooth-allow-bluetooth_t-.patch65
1 files changed, 65 insertions, 0 deletions
diff --git a/recipes-security/refpolicy/refpolicy/0039-policy-modules-services-bluetooth-allow-bluetooth_t-.patch b/recipes-security/refpolicy/refpolicy/0039-policy-modules-services-bluetooth-allow-bluetooth_t-.patch
new file mode 100644
index 0000000..39e72e8
--- /dev/null
+++ b/recipes-security/refpolicy/refpolicy/0039-policy-modules-services-bluetooth-allow-bluetooth_t-.patch
@@ -0,0 +1,65 @@
1From dfc3e78dfee0709bcbfc2d1959e5b7c27922b1b7 Mon Sep 17 00:00:00 2001
2From: Yi Zhao <yi.zhao@windriver.com>
3Date: Tue, 23 Jun 2020 08:54:20 +0800
4Subject: [PATCH] policy/modules/services/bluetooth: allow bluetooth_t to
5 create and use bluetooth_socket
6
7Fixes:
8type=AVC msg=audit(1592813138.485:17): avc: denied { create } for
9pid=324 comm="bluetoothd" scontext=system_u:system_r:bluetooth_t
10tcontext=system_u:system_r:bluetooth_t tclass=bluetooth_socket
11permissive=1
12type=AVC msg=audit(1592813138.485:18): avc: denied { bind } for
13pid=324 comm="bluetoothd" scontext=system_u:system_r:bluetooth_t
14tcontext=system_u:system_r:bluetooth_t tclass=bluetooth_socket
15permissive=1
16type=AVC msg=audit(1592813138.485:19): avc: denied { write } for
17pid=324 comm="bluetoothd" scontext=system_u:system_r:bluetooth_t
18tcontext=system_u:system_r:bluetooth_t tclass=bluetooth_socket
19permissive=1
20type=AVC msg=audit(1592813138.488:20): avc: denied { getattr } for
21pid=324 comm="bluetoothd" path="socket:[11771]" dev="sockfs" ino=11771
22scontext=system_u:system_r:bluetooth_t
23tcontext=system_u:system_r:bluetooth_t tclass=bluetooth_socket
24permissive=1
25type=AVC msg=audit(1592813138.488:21): avc: denied { listen } for
26pid=324 comm="bluetoothd" scontext=system_u:system_r:bluetooth_t
27tcontext=system_u:system_r:bluetooth_t tclass=bluetooth_socket
28permissive=1
29type=AVC msg=audit(1592813138.498:22): avc: denied { read } for
30pid=324 comm="bluetoothd" path="socket:[11771]" dev="sockfs" ino=11771
31scontext=system_u:system_r:bluetooth_t
32tcontext=system_u:system_r:bluetooth_t tclass=bluetooth_socket
33permissive=1
34
35Upstream-Status: Inappropriate [embedded specific]
36
37Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
38---
39 policy/modules/services/bluetooth.te | 3 +++
40 1 file changed, 3 insertions(+)
41
42diff --git a/policy/modules/services/bluetooth.te b/policy/modules/services/bluetooth.te
43index 025eff444..63e50aeda 100644
44--- a/policy/modules/services/bluetooth.te
45+++ b/policy/modules/services/bluetooth.te
46@@ -60,6 +60,7 @@ allow bluetooth_t self:socket create_stream_socket_perms;
47 allow bluetooth_t self:unix_stream_socket { accept connectto listen };
48 allow bluetooth_t self:tcp_socket { accept listen };
49 allow bluetooth_t self:netlink_kobject_uevent_socket create_socket_perms;
50+allow bluetooth_t self:bluetooth_socket create_stream_socket_perms;
51
52 read_files_pattern(bluetooth_t, bluetooth_conf_t, bluetooth_conf_t)
53
54@@ -127,6 +128,8 @@ userdom_dontaudit_use_unpriv_user_fds(bluetooth_t)
55 userdom_dontaudit_use_user_terminals(bluetooth_t)
56 userdom_dontaudit_search_user_home_dirs(bluetooth_t)
57
58+init_dbus_send_script(bluetooth_t)
59+
60 optional_policy(`
61 dbus_system_bus_client(bluetooth_t)
62 dbus_connect_system_bus(bluetooth_t)
63--
642.17.1
65