diff options
Diffstat (limited to 'meta/recipes-connectivity/bluez5/bluez5/CVE-2022-3637.patch')
-rw-r--r-- | meta/recipes-connectivity/bluez5/bluez5/CVE-2022-3637.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/bluez5/bluez5/CVE-2022-3637.patch b/meta/recipes-connectivity/bluez5/bluez5/CVE-2022-3637.patch new file mode 100644 index 0000000000..4ca60f99d5 --- /dev/null +++ b/meta/recipes-connectivity/bluez5/bluez5/CVE-2022-3637.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From b808b2852a0b48c6f9dbb038f932613cea3126c2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hitendra Prajapati <hprajapati@mvista.com> | ||
3 | Date: Thu, 27 Oct 2022 09:51:27 +0530 | ||
4 | Subject: [PATCH] CVE-2022-3637 | ||
5 | |||
6 | Upstream-Status: Backport [https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/monitor/jlink.c?id=1d6cfb8e625a944010956714c1802bc1e1fc6c4f] | ||
7 | CVE: CVE-2022-3637 | ||
8 | Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com> | ||
9 | |||
10 | monitor: Fix crash when using RTT backend | ||
11 | |||
12 | This fix regression introduced by "monitor: Fix memory leaks". | ||
13 | J-Link shared library is in use if jlink_init() returns 0 and thus | ||
14 | handle shall not be closed. | ||
15 | --- | ||
16 | monitor/jlink.c | 5 ++++- | ||
17 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/monitor/jlink.c b/monitor/jlink.c | ||
20 | index afa9d93..5bd4aed 100644 | ||
21 | --- a/monitor/jlink.c | ||
22 | +++ b/monitor/jlink.c | ||
23 | @@ -120,9 +120,12 @@ int jlink_init(void) | ||
24 | !jlink.tif_select || !jlink.setspeed || | ||
25 | !jlink.connect || !jlink.getsn || | ||
26 | !jlink.emu_getproductname || | ||
27 | - !jlink.rtterminal_control || !jlink.rtterminal_read) | ||
28 | + !jlink.rtterminal_control || !jlink.rtterminal_read) { | ||
29 | + dlclose(so); | ||
30 | return -EIO; | ||
31 | + } | ||
32 | |||
33 | + /* don't dlclose(so) here cause symbols from it are in use now */ | ||
34 | return 0; | ||
35 | } | ||
36 | |||
37 | -- | ||
38 | 2.25.1 | ||
39 | |||