From b1e48279da5f02178c69fb1d03d26b1f380e20c21d7ddc0fc7d812f7aeecc61b Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Wed, 18 Mar 2020 09:54:39 +0000 Subject: [PATCH 1/2] Accepting request 786108 from home:acho:branches:Base:System add patches for bsc#1166751 CVE-2020-0556 OBS-URL: https://build.opensuse.org/request/show/786108 OBS-URL: https://build.opensuse.org/package/show/Base:System/bluez?expand=0&rev=289 --- ...cepts-bonded-device-connections-only.patch | 138 ++++++++++++++++++ ...only-accept-data-from-bonded-devices.patch | 31 ++++ bluez.changes | 17 +++ bluez.spec | 9 ++ ...LEAutoSecurity-setting-to-input.conf.patch | 121 +++++++++++++++ ...t-to-set-security-level-if-not-bonde.patch | 48 ++++++ 6 files changed, 364 insertions(+) create mode 100644 HID-accepts-bonded-device-connections-only.patch create mode 100644 HOGP-must-only-accept-data-from-bonded-devices.patch create mode 100644 input-Add-LEAutoSecurity-setting-to-input.conf.patch create mode 100644 input-hog-Attempt-to-set-security-level-if-not-bonde.patch diff --git a/HID-accepts-bonded-device-connections-only.patch b/HID-accepts-bonded-device-connections-only.patch new file mode 100644 index 0000000..b0eb806 --- /dev/null +++ b/HID-accepts-bonded-device-connections-only.patch @@ -0,0 +1,138 @@ +From 3cccdbab2324086588df4ccf5f892fb3ce1f1787 Mon Sep 17 00:00:00 2001 +From: Alain Michaud +Date: Tue, 10 Mar 2020 02:35:18 +0000 +Subject: [PATCH] HID accepts bonded device connections only. + +This change adds a configuration for platforms to choose a more secure +posture for the HID profile. While some older mice are known to not +support pairing or encryption, some platform may choose a more secure +posture by requiring the device to be bonded and require the +connection to be encrypted when bonding is required. + +Reference: +https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00352.html +--- + profiles/input/device.c | 23 ++++++++++++++++++++++- + profiles/input/device.h | 1 + + profiles/input/input.conf | 8 ++++++++ + profiles/input/manager.c | 13 ++++++++++++- + 4 files changed, 43 insertions(+), 2 deletions(-) + +diff --git a/profiles/input/device.c b/profiles/input/device.c +index 2cb3811c8..d89da2d7c 100644 +--- a/profiles/input/device.c ++++ b/profiles/input/device.c +@@ -92,6 +92,7 @@ struct input_device { + + static int idle_timeout = 0; + static bool uhid_enabled = false; ++static bool classic_bonded_only = false; + + void input_set_idle_timeout(int timeout) + { +@@ -103,6 +104,11 @@ void input_enable_userspace_hid(bool state) + uhid_enabled = state; + } + ++void input_set_classic_bonded_only(bool state) ++{ ++ classic_bonded_only = state; ++} ++ + static void input_device_enter_reconnect_mode(struct input_device *idev); + static int connection_disconnect(struct input_device *idev, uint32_t flags); + +@@ -970,8 +976,18 @@ static int hidp_add_connection(struct input_device *idev) + if (device_name_known(idev->device)) + device_get_name(idev->device, req->name, sizeof(req->name)); + ++ /* Make sure the device is bonded if required */ ++ if (classic_bonded_only && !device_is_bonded(idev->device, ++ btd_device_get_bdaddr_type(idev->device))) { ++ error("Rejected connection from !bonded device %s", dst_addr); ++ goto cleanup; ++ } ++ + /* Encryption is mandatory for keyboards */ +- if (req->subclass & 0x40) { ++ /* Some platforms may choose to require encryption for all devices */ ++ /* Note that this only matters for pre 2.1 devices as otherwise the */ ++ /* device is encrypted by default by the lower layers */ ++ if (classic_bonded_only || req->subclass & 0x40) { + if (!bt_io_set(idev->intr_io, &gerr, + BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_MEDIUM, + BT_IO_OPT_INVALID)) { +@@ -1203,6 +1219,11 @@ static void input_device_enter_reconnect_mode(struct input_device *idev) + DBG("path=%s reconnect_mode=%s", idev->path, + reconnect_mode_to_string(idev->reconnect_mode)); + ++ /* Make sure the device is bonded if required */ ++ if (classic_bonded_only && !device_is_bonded(idev->device, ++ btd_device_get_bdaddr_type(idev->device))) ++ return; ++ + /* Only attempt an auto-reconnect when the device is required to + * accept reconnections from the host. + */ +diff --git a/profiles/input/device.h b/profiles/input/device.h +index 51a9aee18..3044db673 100644 +--- a/profiles/input/device.h ++++ b/profiles/input/device.h +@@ -29,6 +29,7 @@ struct input_conn; + + void input_set_idle_timeout(int timeout); + void input_enable_userspace_hid(bool state); ++void input_set_classic_bonded_only(bool state); + + int input_device_register(struct btd_service *service); + void input_device_unregister(struct btd_service *service); +diff --git a/profiles/input/input.conf b/profiles/input/input.conf +index 3e1d65aae..166aff4a4 100644 +--- a/profiles/input/input.conf ++++ b/profiles/input/input.conf +@@ -11,3 +11,11 @@ + # Enable HID protocol handling in userspace input profile + # Defaults to false (HIDP handled in HIDP kernel module) + #UserspaceHID=true ++ ++# Limit HID connections to bonded devices ++# The HID Profile does not specify that devices must be bonded, however some ++# platforms may want to make sure that input connections only come from bonded ++# device connections. Several older mice have been known for not supporting ++# pairing/encryption. ++# Defaults to false to maximize device compatibility. ++#ClassicBondedOnly=true +diff --git a/profiles/input/manager.c b/profiles/input/manager.c +index 1d31b0652..5cd27b839 100644 +--- a/profiles/input/manager.c ++++ b/profiles/input/manager.c +@@ -96,7 +96,7 @@ static int input_init(void) + config = load_config_file(CONFIGDIR "/input.conf"); + if (config) { + int idle_timeout; +- gboolean uhid_enabled; ++ gboolean uhid_enabled, classic_bonded_only; + + idle_timeout = g_key_file_get_integer(config, "General", + "IdleTimeout", &err); +@@ -114,6 +114,17 @@ static int input_init(void) + input_enable_userspace_hid(uhid_enabled); + } else + g_clear_error(&err); ++ ++ classic_bonded_only = g_key_file_get_boolean(config, "General", ++ "ClassicBondedOnly", &err); ++ ++ if (!err) { ++ DBG("input.conf: ClassicBondedOnly=%s", ++ classic_bonded_only ? "true" : "false"); ++ input_set_classic_bonded_only(classic_bonded_only); ++ } else ++ g_clear_error(&err); ++ + } + + btd_profile_register(&input_profile); +-- +2.25.1 + diff --git a/HOGP-must-only-accept-data-from-bonded-devices.patch b/HOGP-must-only-accept-data-from-bonded-devices.patch new file mode 100644 index 0000000..51e972d --- /dev/null +++ b/HOGP-must-only-accept-data-from-bonded-devices.patch @@ -0,0 +1,31 @@ +From 8cdbd3b09f29da29374e2f83369df24228da0ad1 Mon Sep 17 00:00:00 2001 +From: Alain Michaud +Date: Tue, 10 Mar 2020 02:35:16 +0000 +Subject: [PATCH] HOGP must only accept data from bonded devices. + +HOGP 1.0 Section 6.1 establishes that the HOGP must require bonding. + +Reference: +https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00352.htm +--- + profiles/input/hog.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/profiles/input/hog.c b/profiles/input/hog.c +index 83c017dcb..dfac68921 100644 +--- a/profiles/input/hog.c ++++ b/profiles/input/hog.c +@@ -186,6 +186,10 @@ static int hog_accept(struct btd_service *service) + return -EINVAL; + } + ++ /* HOGP 1.0 Section 6.1 requires bonding */ ++ if (!device_is_bonded(device, btd_device_get_bdaddr_type(device))) ++ return -ECONNREFUSED; ++ + /* TODO: Replace GAttrib with bt_gatt_client */ + bt_hog_attach(dev->hog, attrib); + +-- +2.25.1 + diff --git a/bluez.changes b/bluez.changes index 8c3488e..a566bca 100644 --- a/bluez.changes +++ b/bluez.changes @@ -1,3 +1,20 @@ +------------------------------------------------------------------- +Wed Mar 18 08:29:49 UTC 2020 - Al Cho + +- Add + HOGP-must-only-accept-data-from-bonded-devices.patch + HOGP 1.0 Section 6.1 establishes that the HOGP must require + bonding.(bsc#1166751)(CVE-2020-0556) + HID-accepts-bonded-device-connections-only.patch + This change adds a configuration for platforms to choose a more + secure posture for the HID profile.(bsc#1166751)(CVE-2020-0556) + input-hog-Attempt-to-set-security-level-if-not-bonde.patch + Attempt to set security level if not bonded. + (bsc#1166751)(CVE-2020-0556) + input-Add-LEAutoSecurity-setting-to-input.conf.patch + Add LEAutoSecurity setting to input.conf. + (bsc#1166751)(CVE-2020-0556) + ------------------------------------------------------------------- Mon Feb 10 10:05:33 UTC 2020 - Ismail Dönmez diff --git a/bluez.spec b/bluez.spec index 62f7691..7f4ce8f 100644 --- a/bluez.spec +++ b/bluez.spec @@ -57,6 +57,11 @@ Patch10: RPi-Move-the-43xx-firmware-into-lib-firmware.patch # fix some memory leak with malformed packet (reported upstream but not yet fixed) Patch101: CVE-2016-9800-tool-hcidump-Fix-memory-leak-with-malformed-packet.patch Patch102: CVE-2016-9804-tool-hcidump-Fix-memory-leak-with-malformed-packet.patch +# PATCH-FIX-UPSTREAM: bsc#1166751 CVE-2020-0556 +Patch103: HOGP-must-only-accept-data-from-bonded-devices.patch +Patch104: HID-accepts-bonded-device-connections-only.patch +Patch105: input-hog-Attempt-to-set-security-level-if-not-bonde.patch +Patch106: input-Add-LEAutoSecurity-setting-to-input.conf.patch BuildRequires: automake BuildRequires: flex @@ -188,6 +193,10 @@ to use the modern tools instead. %patch10 -p1 %patch101 -p1 %patch102 -p1 +%patch103 -p1 +%patch104 -p1 +%patch105 -p1 +%patch106 -p1 mkdir dbus-apis cp -a doc/*.txt dbus-apis/ # FIXME: Change the dbus service to be a real service, not systemd launched diff --git a/input-Add-LEAutoSecurity-setting-to-input.conf.patch b/input-Add-LEAutoSecurity-setting-to-input.conf.patch new file mode 100644 index 0000000..9800c19 --- /dev/null +++ b/input-Add-LEAutoSecurity-setting-to-input.conf.patch @@ -0,0 +1,121 @@ +From f2778f5877d20696d68a452b26e4accb91bfb19e Mon Sep 17 00:00:00 2001 +From: Luiz Augusto von Dentz +Date: Wed, 11 Mar 2020 11:43:21 -0700 +Subject: [PATCH] input: Add LEAutoSecurity setting to input.conf + +LEAutoSecurity can be used to enable/disable automatic upgrades of +security for LE devices, by default it is enabled so existing devices +that did not require security and were not bonded will automatically +upgrade the security. + +Note: Platforms disabling this setting would require users to manually +bond the device which may require changes to the user interface to +always force bonding for input devices as APIs such as Device.Connect +will no longer work which maybe perceived as a regression. +--- + profiles/input/device.h | 1 + + profiles/input/hog.c | 13 +++++++++++-- + profiles/input/input.conf | 5 +++++ + profiles/input/manager.c | 11 ++++++++++- + 4 files changed, 27 insertions(+), 3 deletions(-) + +diff --git a/profiles/input/device.h b/profiles/input/device.h +index 3044db673..5a077f92a 100644 +--- a/profiles/input/device.h ++++ b/profiles/input/device.h +@@ -30,6 +30,7 @@ struct input_conn; + void input_set_idle_timeout(int timeout); + void input_enable_userspace_hid(bool state); + void input_set_classic_bonded_only(bool state); ++void input_set_auto_sec(bool state); + + int input_device_register(struct btd_service *service); + void input_device_unregister(struct btd_service *service); +diff --git a/profiles/input/hog.c b/profiles/input/hog.c +index f0226ebbd..327a1d1c3 100644 +--- a/profiles/input/hog.c ++++ b/profiles/input/hog.c +@@ -53,6 +53,7 @@ + #include "src/shared/gatt-client.h" + #include "src/plugin.h" + ++#include "device.h" + #include "suspend.h" + #include "attrib/att.h" + #include "attrib/gattrib.h" +@@ -67,8 +68,14 @@ struct hog_device { + }; + + static gboolean suspend_supported = FALSE; ++static bool auto_sec = true; + static struct queue *devices = NULL; + ++void input_set_auto_sec(bool state) ++{ ++ auto_sec = state; ++} ++ + static void hog_device_accept(struct hog_device *dev, struct gatt_db *db) + { + char name[248]; +@@ -192,11 +199,13 @@ static int hog_accept(struct btd_service *service) + if (!device_is_bonded(device, btd_device_get_bdaddr_type(device))) { + struct bt_gatt_client *client; + ++ if (!auto_sec) ++ return -ECONNREFUSED; ++ + client = btd_device_get_gatt_client(device); + if (!bt_gatt_client_set_security(client, +- BT_ATT_SECURITY_MEDIUM)) { ++ BT_ATT_SECURITY_MEDIUM)) + return -ECONNREFUSED; +- } + } + + /* TODO: Replace GAttrib with bt_gatt_client */ +diff --git a/profiles/input/input.conf b/profiles/input/input.conf +index 166aff4a4..4c70bc561 100644 +--- a/profiles/input/input.conf ++++ b/profiles/input/input.conf +@@ -19,3 +19,8 @@ + # pairing/encryption. + # Defaults to false to maximize device compatibility. + #ClassicBondedOnly=true ++ ++# LE upgrade security ++# Enables upgrades of security automatically if required. ++# Defaults to true to maximize device compatibility. ++#LEAutoSecurity=true +diff --git a/profiles/input/manager.c b/profiles/input/manager.c +index 5cd27b839..bf4acb4ed 100644 +--- a/profiles/input/manager.c ++++ b/profiles/input/manager.c +@@ -96,7 +96,7 @@ static int input_init(void) + config = load_config_file(CONFIGDIR "/input.conf"); + if (config) { + int idle_timeout; +- gboolean uhid_enabled, classic_bonded_only; ++ gboolean uhid_enabled, classic_bonded_only, auto_sec; + + idle_timeout = g_key_file_get_integer(config, "General", + "IdleTimeout", &err); +@@ -125,6 +125,15 @@ static int input_init(void) + } else + g_clear_error(&err); + ++ auto_sec = g_key_file_get_boolean(config, "General", ++ "LEAutoSecurity", &err); ++ if (!err) { ++ DBG("input.conf: LEAutoSecurity=%s", ++ auto_sec ? "true" : "false"); ++ input_set_auto_sec(auto_sec); ++ } else ++ g_clear_error(&err); ++ + } + + btd_profile_register(&input_profile); +-- +2.25.1 + diff --git a/input-hog-Attempt-to-set-security-level-if-not-bonde.patch b/input-hog-Attempt-to-set-security-level-if-not-bonde.patch new file mode 100644 index 0000000..f868203 --- /dev/null +++ b/input-hog-Attempt-to-set-security-level-if-not-bonde.patch @@ -0,0 +1,48 @@ +From 35d8d895cd0b724e58129374beb0bb4a2edf9519 Mon Sep 17 00:00:00 2001 +From: Luiz Augusto von Dentz +Date: Tue, 10 Mar 2020 09:59:07 -0700 +Subject: [PATCH] input: hog: Attempt to set security level if not bonded + +This attempts to set the security if the device is not bonded, the +kernel will block any communication on the ATT socket while bumping +the security and if that fails the device will be disconnected which +is better than having the device dangling around without being able to +communicate with it until it is properly bonded. +--- + profiles/input/hog.c | 13 +++++++++++-- + 1 file changed, 11 insertions(+), 2 deletions(-) + +diff --git a/profiles/input/hog.c b/profiles/input/hog.c +index dfac68921..f0226ebbd 100644 +--- a/profiles/input/hog.c ++++ b/profiles/input/hog.c +@@ -49,6 +49,8 @@ + #include "src/shared/util.h" + #include "src/shared/uhid.h" + #include "src/shared/queue.h" ++#include "src/shared/att.h" ++#include "src/shared/gatt-client.h" + #include "src/plugin.h" + + #include "suspend.h" +@@ -187,8 +189,15 @@ static int hog_accept(struct btd_service *service) + } + + /* HOGP 1.0 Section 6.1 requires bonding */ +- if (!device_is_bonded(device, btd_device_get_bdaddr_type(device))) +- return -ECONNREFUSED; ++ if (!device_is_bonded(device, btd_device_get_bdaddr_type(device))) { ++ struct bt_gatt_client *client; ++ ++ client = btd_device_get_gatt_client(device); ++ if (!bt_gatt_client_set_security(client, ++ BT_ATT_SECURITY_MEDIUM)) { ++ return -ECONNREFUSED; ++ } ++ } + + /* TODO: Replace GAttrib with bt_gatt_client */ + bt_hog_attach(dev->hog, attrib); +-- +2.25.1 + From b061e3b3a735352cace28c78b88506e5064fb3e9f68e28e54478449deede7c44 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 21 Mar 2020 09:00:30 +0000 Subject: [PATCH 2/2] Accepting request 787079 from home:seife:testing update to bluez-5.54 OBS-URL: https://build.opensuse.org/request/show/787079 OBS-URL: https://build.opensuse.org/package/show/Base:System/bluez?expand=0&rev=290 --- ...cepts-bonded-device-connections-only.patch | 138 ------------------ ...only-accept-data-from-bonded-devices.patch | 31 ---- bluez-5.52.tar.xz | 3 - bluez-5.54.tar.xz | 3 + bluez-cups-libexec.patch | 4 +- bluez-disable-broken-tests.diff | 8 +- bluez.changes | 20 +++ bluez.spec | 9 +- 8 files changed, 32 insertions(+), 184 deletions(-) delete mode 100644 HID-accepts-bonded-device-connections-only.patch delete mode 100644 HOGP-must-only-accept-data-from-bonded-devices.patch delete mode 100644 bluez-5.52.tar.xz create mode 100644 bluez-5.54.tar.xz diff --git a/HID-accepts-bonded-device-connections-only.patch b/HID-accepts-bonded-device-connections-only.patch deleted file mode 100644 index b0eb806..0000000 --- a/HID-accepts-bonded-device-connections-only.patch +++ /dev/null @@ -1,138 +0,0 @@ -From 3cccdbab2324086588df4ccf5f892fb3ce1f1787 Mon Sep 17 00:00:00 2001 -From: Alain Michaud -Date: Tue, 10 Mar 2020 02:35:18 +0000 -Subject: [PATCH] HID accepts bonded device connections only. - -This change adds a configuration for platforms to choose a more secure -posture for the HID profile. While some older mice are known to not -support pairing or encryption, some platform may choose a more secure -posture by requiring the device to be bonded and require the -connection to be encrypted when bonding is required. - -Reference: -https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00352.html ---- - profiles/input/device.c | 23 ++++++++++++++++++++++- - profiles/input/device.h | 1 + - profiles/input/input.conf | 8 ++++++++ - profiles/input/manager.c | 13 ++++++++++++- - 4 files changed, 43 insertions(+), 2 deletions(-) - -diff --git a/profiles/input/device.c b/profiles/input/device.c -index 2cb3811c8..d89da2d7c 100644 ---- a/profiles/input/device.c -+++ b/profiles/input/device.c -@@ -92,6 +92,7 @@ struct input_device { - - static int idle_timeout = 0; - static bool uhid_enabled = false; -+static bool classic_bonded_only = false; - - void input_set_idle_timeout(int timeout) - { -@@ -103,6 +104,11 @@ void input_enable_userspace_hid(bool state) - uhid_enabled = state; - } - -+void input_set_classic_bonded_only(bool state) -+{ -+ classic_bonded_only = state; -+} -+ - static void input_device_enter_reconnect_mode(struct input_device *idev); - static int connection_disconnect(struct input_device *idev, uint32_t flags); - -@@ -970,8 +976,18 @@ static int hidp_add_connection(struct input_device *idev) - if (device_name_known(idev->device)) - device_get_name(idev->device, req->name, sizeof(req->name)); - -+ /* Make sure the device is bonded if required */ -+ if (classic_bonded_only && !device_is_bonded(idev->device, -+ btd_device_get_bdaddr_type(idev->device))) { -+ error("Rejected connection from !bonded device %s", dst_addr); -+ goto cleanup; -+ } -+ - /* Encryption is mandatory for keyboards */ -- if (req->subclass & 0x40) { -+ /* Some platforms may choose to require encryption for all devices */ -+ /* Note that this only matters for pre 2.1 devices as otherwise the */ -+ /* device is encrypted by default by the lower layers */ -+ if (classic_bonded_only || req->subclass & 0x40) { - if (!bt_io_set(idev->intr_io, &gerr, - BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_MEDIUM, - BT_IO_OPT_INVALID)) { -@@ -1203,6 +1219,11 @@ static void input_device_enter_reconnect_mode(struct input_device *idev) - DBG("path=%s reconnect_mode=%s", idev->path, - reconnect_mode_to_string(idev->reconnect_mode)); - -+ /* Make sure the device is bonded if required */ -+ if (classic_bonded_only && !device_is_bonded(idev->device, -+ btd_device_get_bdaddr_type(idev->device))) -+ return; -+ - /* Only attempt an auto-reconnect when the device is required to - * accept reconnections from the host. - */ -diff --git a/profiles/input/device.h b/profiles/input/device.h -index 51a9aee18..3044db673 100644 ---- a/profiles/input/device.h -+++ b/profiles/input/device.h -@@ -29,6 +29,7 @@ struct input_conn; - - void input_set_idle_timeout(int timeout); - void input_enable_userspace_hid(bool state); -+void input_set_classic_bonded_only(bool state); - - int input_device_register(struct btd_service *service); - void input_device_unregister(struct btd_service *service); -diff --git a/profiles/input/input.conf b/profiles/input/input.conf -index 3e1d65aae..166aff4a4 100644 ---- a/profiles/input/input.conf -+++ b/profiles/input/input.conf -@@ -11,3 +11,11 @@ - # Enable HID protocol handling in userspace input profile - # Defaults to false (HIDP handled in HIDP kernel module) - #UserspaceHID=true -+ -+# Limit HID connections to bonded devices -+# The HID Profile does not specify that devices must be bonded, however some -+# platforms may want to make sure that input connections only come from bonded -+# device connections. Several older mice have been known for not supporting -+# pairing/encryption. -+# Defaults to false to maximize device compatibility. -+#ClassicBondedOnly=true -diff --git a/profiles/input/manager.c b/profiles/input/manager.c -index 1d31b0652..5cd27b839 100644 ---- a/profiles/input/manager.c -+++ b/profiles/input/manager.c -@@ -96,7 +96,7 @@ static int input_init(void) - config = load_config_file(CONFIGDIR "/input.conf"); - if (config) { - int idle_timeout; -- gboolean uhid_enabled; -+ gboolean uhid_enabled, classic_bonded_only; - - idle_timeout = g_key_file_get_integer(config, "General", - "IdleTimeout", &err); -@@ -114,6 +114,17 @@ static int input_init(void) - input_enable_userspace_hid(uhid_enabled); - } else - g_clear_error(&err); -+ -+ classic_bonded_only = g_key_file_get_boolean(config, "General", -+ "ClassicBondedOnly", &err); -+ -+ if (!err) { -+ DBG("input.conf: ClassicBondedOnly=%s", -+ classic_bonded_only ? "true" : "false"); -+ input_set_classic_bonded_only(classic_bonded_only); -+ } else -+ g_clear_error(&err); -+ - } - - btd_profile_register(&input_profile); --- -2.25.1 - diff --git a/HOGP-must-only-accept-data-from-bonded-devices.patch b/HOGP-must-only-accept-data-from-bonded-devices.patch deleted file mode 100644 index 51e972d..0000000 --- a/HOGP-must-only-accept-data-from-bonded-devices.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 8cdbd3b09f29da29374e2f83369df24228da0ad1 Mon Sep 17 00:00:00 2001 -From: Alain Michaud -Date: Tue, 10 Mar 2020 02:35:16 +0000 -Subject: [PATCH] HOGP must only accept data from bonded devices. - -HOGP 1.0 Section 6.1 establishes that the HOGP must require bonding. - -Reference: -https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00352.htm ---- - profiles/input/hog.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/profiles/input/hog.c b/profiles/input/hog.c -index 83c017dcb..dfac68921 100644 ---- a/profiles/input/hog.c -+++ b/profiles/input/hog.c -@@ -186,6 +186,10 @@ static int hog_accept(struct btd_service *service) - return -EINVAL; - } - -+ /* HOGP 1.0 Section 6.1 requires bonding */ -+ if (!device_is_bonded(device, btd_device_get_bdaddr_type(device))) -+ return -ECONNREFUSED; -+ - /* TODO: Replace GAttrib with bt_gatt_client */ - bt_hog_attach(dev->hog, attrib); - --- -2.25.1 - diff --git a/bluez-5.52.tar.xz b/bluez-5.52.tar.xz deleted file mode 100644 index e0382dc..0000000 --- a/bluez-5.52.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f7144ce2039202cfac18ccb52426efea11c98e4f6e1bb8041bcb994b8378560a -size 1957504 diff --git a/bluez-5.54.tar.xz b/bluez-5.54.tar.xz new file mode 100644 index 0000000..7bcd261 --- /dev/null +++ b/bluez-5.54.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:68cdab9e63e8832b130d5979dc8c96fdb087b31278f342874d992af3e56656dc +size 2003760 diff --git a/bluez-cups-libexec.patch b/bluez-cups-libexec.patch index 686fe83..2a55dbd 100644 --- a/bluez-cups-libexec.patch +++ b/bluez-cups-libexec.patch @@ -2,7 +2,7 @@ Index: b/Makefile.in =================================================================== --- a/Makefile.in +++ b/Makefile.in -@@ -3439,7 +3439,7 @@ unit_tests = $(am__append_54) unit/test- +@@ -3548,7 +3548,7 @@ unit_tests = $(am__append_54) unit/test- @DEPRECATED_TRUE@@READLINE_TRUE@attrib_gatttool_LDADD = lib/libbluetooth-internal.la \ @DEPRECATED_TRUE@@READLINE_TRUE@ src/libshared-glib.la $(GLIB_LIBS) -lreadline @@ -15,7 +15,7 @@ Index: b/Makefile.tools =================================================================== --- a/Makefile.tools +++ b/Makefile.tools -@@ -441,7 +441,7 @@ endif +@@ -463,7 +463,7 @@ endif endif if CUPS diff --git a/bluez-disable-broken-tests.diff b/bluez-disable-broken-tests.diff index 89e3d16..bc7176c 100644 --- a/bluez-disable-broken-tests.diff +++ b/bluez-disable-broken-tests.diff @@ -2,7 +2,7 @@ Index: b/Makefile.am =================================================================== --- a/Makefile.am +++ b/Makefile.am -@@ -481,7 +481,8 @@ unit_test_lib_SOURCES = unit/test-lib.c +@@ -497,7 +497,8 @@ unit_test_lib_SOURCES = unit/test-lib.c unit_test_lib_LDADD = src/libshared-glib.la \ lib/libbluetooth-internal.la $(GLIB_LIBS) @@ -12,7 +12,7 @@ Index: b/Makefile.am unit_test_gatt_SOURCES = unit/test-gatt.c unit_test_gatt_LDADD = src/libshared-glib.la \ -@@ -511,7 +512,8 @@ unit_test_gattrib_LDADD = lib/libbluetoo +@@ -527,7 +528,8 @@ unit_test_gattrib_LDADD = lib/libbluetoo $(GLIB_LIBS) $(DBUS_LIBS) -ldl -lrt if MIDI @@ -22,7 +22,7 @@ Index: b/Makefile.am unit_test_midi_CPPFLAGS = $(AM_CPPFLAGS) $(ALSA_CFLAGS) -DMIDI_TEST unit_test_midi_SOURCES = unit/test-midi.c \ profiles/midi/libmidi.h \ -@@ -521,7 +523,7 @@ unit_test_midi_LDADD = src/libshared-gli +@@ -537,7 +539,7 @@ unit_test_midi_LDADD = src/libshared-gli endif if MESH @@ -30,4 +30,4 @@ Index: b/Makefile.am +#unit_tests += unit/test-mesh-crypto unit_test_mesh_crypto_CPPFLAGS = $(ell_cflags) unit_test_mesh_crypto_SOURCES = unit/test-mesh-crypto.c \ - mesh/crypto.h ell/internal ell/ell.h \ + mesh/crypto.h ell/internal ell/ell.h diff --git a/bluez.changes b/bluez.changes index a566bca..d55cd8d 100644 --- a/bluez.changes +++ b/bluez.changes @@ -1,3 +1,23 @@ +------------------------------------------------------------------- +Fri Mar 20 17:04:10 UTC 2020 - Stefan Seyfried + +- update to bluez-5.54: + * Fix issue with HOGP to accept data only from bonded devices. + * Fix issue with A2DP sessions being connected at the same time. + * Fix issue with class UUID matches before connecting profile. + * Add support for handling MTU auto-tuning option for AVDTP. + * Add support for new policy for Just-Works repairing. + * Add support for Enhanced ATT bearer (EATT). +- bluez-5.53: + * Fix issue with handling unregistration for advertisment. + * Fix issue with A2DP and handling recovering process. + * Fix issue with udpating input device information. + * Add support for loading blocked keys. +- remove obsolete upstreamed patches: + * HOGP-must-only-accept-data-from-bonded-devices.patch + * HID-accepts-bonded-device-connections-only.patch +- refresh other patches + ------------------------------------------------------------------- Wed Mar 18 08:29:49 UTC 2020 - Al Cho diff --git a/bluez.spec b/bluez.spec index 7f4ce8f..2f5ce7a 100644 --- a/bluez.spec +++ b/bluez.spec @@ -2,7 +2,7 @@ # spec file for package bluez # # Copyright (c) 2020 SUSE LLC -# Copyright (c) 2010-2019 B1 Systems GmbH, Vohburg, Germany +# Copyright (c) 2010-2020 B1 Systems GmbH, Vohburg, Germany # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -29,7 +29,7 @@ # contributions via pull requests are welcome! # Name: bluez -Version: 5.52 +Version: 5.54 Release: 0 Summary: Bluetooth Stack for Linux License: GPL-2.0-or-later @@ -58,8 +58,6 @@ Patch10: RPi-Move-the-43xx-firmware-into-lib-firmware.patch Patch101: CVE-2016-9800-tool-hcidump-Fix-memory-leak-with-malformed-packet.patch Patch102: CVE-2016-9804-tool-hcidump-Fix-memory-leak-with-malformed-packet.patch # PATCH-FIX-UPSTREAM: bsc#1166751 CVE-2020-0556 -Patch103: HOGP-must-only-accept-data-from-bonded-devices.patch -Patch104: HID-accepts-bonded-device-connections-only.patch Patch105: input-hog-Attempt-to-set-security-level-if-not-bonde.patch Patch106: input-Add-LEAutoSecurity-setting-to-input.conf.patch @@ -193,8 +191,6 @@ to use the modern tools instead. %patch10 -p1 %patch101 -p1 %patch102 -p1 -%patch103 -p1 -%patch104 -p1 %patch105 -p1 %patch106 -p1 mkdir dbus-apis @@ -358,6 +354,7 @@ make check V=0 %{_bindir}/btmon %if %{with mesh} %{_bindir}/meshctl +%{_bindir}/mesh-cfgclient %endif %{_bindir}/bccmd %{_prefix}/lib/udev/