Skip to content

Commit d75967c

Browse files
authored
Add patch for Bluez CVE-2022-3563 (#6335)
* add patch for CVE-2022-3563 * add patch * update typo --------- Co-authored-by: minghe <rmhsawyer>
1 parent 6d61380 commit d75967c

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

SPECS/bluez/CVE-2022-3563.patch

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
From e3c92f1f786f0b55440bd908b55894d0c792cf0e Mon Sep 17 00:00:00 2001
2+
From: Tedd Ho-Jeong An <[email protected]>
3+
Date: Wed, 22 Jun 2022 21:45:20 -0700
4+
Subject: mgmt-tester: Fix null dereference issue reported by scan-build
5+
6+
This patch fixes the null dereference reported by the scan-build.
7+
8+
tools/mgmt-tester.c:12025:28: warning: Access to field 'cap_len' results
9+
in a dereference of a null pointer (loaded from variable 'rp')
10+
[core.NullDereference]
11+
12+
if (sizeof(rp->cap_len) + rp->cap_len != length) {
13+
^~~~~~~~~~~
14+
---
15+
tools/mgmt-tester.c | 2 ++
16+
1 file changed, 2 insertions(+)
17+
18+
diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c
19+
index f45a6c015e..6018327f10 100644
20+
--- a/tools/mgmt-tester.c
21+
+++ b/tools/mgmt-tester.c
22+
@@ -12020,12 +12020,14 @@ static void read_50_controller_cap_complete(uint8_t status, uint16_t length,
23+
tester_warn("Failed to read advertising features: %s (0x%02x)",
24+
mgmt_errstr(status), status);
25+
tester_test_failed();
26+
+ return;
27+
}
28+
29+
if (sizeof(rp->cap_len) + rp->cap_len != length) {
30+
tester_warn("Controller capabilities malformed, size %zu != %u",
31+
sizeof(rp->cap_len) + rp->cap_len, length);
32+
tester_test_failed();
33+
+ return;
34+
}
35+
36+
while (offset < rp->cap_len) {
37+
--
38+
cgit

SPECS/bluez/bluez.spec

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Summary: Bluetooth utilities
22
Name: bluez
33
Version: 5.63
4-
Release: 3%{?dist}
4+
Release: 4%{?dist}
55
License: GPLv2+ AND LGPLv2+
66
Vendor: Microsoft Corporation
77
Distribution: Mariner
@@ -23,6 +23,7 @@ Patch6: 0002-Use-g_memdup2-everywhere.patch
2323
# Both patches have one rediff necessary to apply to 5.63
2424
Patch7: 0001-hog-Fix-read-order-of-attributes-rediffed.patch
2525
Patch8: 0002-hog-Add-input-queue-while-uhid-device-has-not-been-c-rediffed.patch
26+
Patch9: CVE-2022-3563.patch
2627
BuildRequires: autoconf
2728
BuildRequires: automake
2829
# For printing
@@ -271,6 +272,9 @@ install emulator/btvirt %{buildroot}/%{_libexecdir}/bluetooth/
271272
%{_userunitdir}/obex.service
272273

273274
%changelog
275+
* Mon Oct 02 2023 Minghe Ren <[email protected]> - 5.63-4
276+
- Add patch for CVE-2022-3563
277+
274278
* Wed Sep 20 2023 Jon Slobodzian <[email protected]> - 5.63-3
275279
- Recompile with stack-protection fixed gcc version (CVE-2023-4039)
276280

0 commit comments

Comments
 (0)