Blame SOURCES/0002-systemd-Add-PrivateTmp-and-NoNewPrivileges-options.patch

ab4cc4
From 4570164f0c90603bd07eb9e7c07e17bbafb5b5da Mon Sep 17 00:00:00 2001
ab4cc4
From: Craig Andrews <candrews@integralblue.com>
ab4cc4
Date: Wed, 13 Sep 2017 15:23:09 +0200
ab4cc4
Subject: [PATCH 2/4] systemd: Add PrivateTmp and NoNewPrivileges options
ab4cc4
ab4cc4
PrivateTmp makes bluetoothd's /tmp and /var/tmp be inside a different
ab4cc4
namespace. This is useful to secure access to temporary files of the
ab4cc4
process.
ab4cc4
ab4cc4
NoNewPrivileges ensures that service process and all its children
ab4cc4
can never gain new privileges through execve(), lowering the risk of
ab4cc4
possible privilege escalations.
ab4cc4
---
ab4cc4
 src/bluetooth.service.in | 6 ++++++
ab4cc4
 1 file changed, 6 insertions(+)
ab4cc4
ab4cc4
diff --git a/src/bluetooth.service.in b/src/bluetooth.service.in
ab4cc4
index f799f65f0..a6f3030f9 100644
ab4cc4
--- a/src/bluetooth.service.in
ab4cc4
+++ b/src/bluetooth.service.in
ab4cc4
@@ -12,8 +12,14 @@ NotifyAccess=main
ab4cc4
 #Restart=on-failure
ab4cc4
 CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
ab4cc4
 LimitNPROC=1
ab4cc4
+
ab4cc4
+# Filesystem lockdown
ab4cc4
 ProtectHome=true
ab4cc4
 ProtectSystem=full
ab4cc4
+PrivateTmp=true
ab4cc4
+
ab4cc4
+# Privilege escalation
ab4cc4
+NoNewPrivileges=true
ab4cc4
 
ab4cc4
 [Install]
ab4cc4
 WantedBy=bluetooth.target
ab4cc4
-- 
ab4cc4
2.14.1
ab4cc4