diff options
| author | Steve Sakoman <steve@sakoman.com> | 2022-02-07 06:33:32 -1000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-02-23 23:43:42 +0000 |
| commit | 9c8b42009673796bd6e7c553203346576c1723e2 (patch) | |
| tree | ea539851812912963fd761fbec6e136f814868cb /meta | |
| parent | 17023dee9baeb88791373345c130b886a942296f (diff) | |
| download | poky-9c8b42009673796bd6e7c553203346576c1723e2.tar.gz | |
connman: fix CVE-2022-23098
An issue was discovered in the DNS proxy in Connman through 1.40.
The TCP server reply implementation has an infinite loop if no
data is received.
Backport patch from:
https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=d8708b85c1e8fe25af7803e8a20cf20e7201d8a4
CVE: CVE-2022-23098
(From OE-Core rev: af56acf66b4196c961a20ec59faa580cc3e3ee23)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/recipes-connectivity/connman/connman/CVE-2022-23098.patch | 50 | ||||
| -rw-r--r-- | meta/recipes-connectivity/connman/connman_1.37.bb | 1 |
2 files changed, 51 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/connman/connman/CVE-2022-23098.patch b/meta/recipes-connectivity/connman/connman/CVE-2022-23098.patch new file mode 100644 index 0000000000..a40c9f583f --- /dev/null +++ b/meta/recipes-connectivity/connman/connman/CVE-2022-23098.patch | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | From d8708b85c1e8fe25af7803e8a20cf20e7201d8a4 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Matthias Gerstner <mgerstner@suse.de> | ||
| 3 | Date: Tue, 25 Jan 2022 10:00:25 +0100 | ||
| 4 | Subject: dnsproxy: Avoid 100 % busy loop in TCP server case | ||
| 5 | |||
| 6 | Once the TCP socket is connected and until the remote server is | ||
| 7 | responding (if ever) ConnMan executes a 100 % CPU loop, since | ||
| 8 | the connected socket will always be writable (G_IO_OUT). | ||
| 9 | |||
| 10 | To fix this, modify the watch after the connection is established to | ||
| 11 | remove the G_IO_OUT from the callback conditions. | ||
| 12 | |||
| 13 | Fixes: CVE-2022-23098 | ||
| 14 | |||
| 15 | Upstream-Status: Backport | ||
| 16 | https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=d8708b85c1e8fe25af7803e8a20cf20e7201d8a4 | ||
| 17 | |||
| 18 | CVE: CVE-2022-23098 | ||
| 19 | Signed-off-by: Steve Sakoman <steve@sakoman.com> | ||
| 20 | |||
| 21 | --- | ||
| 22 | src/dnsproxy.c | 12 ++++++++++++ | ||
| 23 | 1 file changed, 12 insertions(+) | ||
| 24 | |||
| 25 | diff --git a/src/dnsproxy.c b/src/dnsproxy.c | ||
| 26 | index c027bcb9..1ccf36a9 100644 | ||
| 27 | --- a/src/dnsproxy.c | ||
| 28 | +++ b/src/dnsproxy.c | ||
| 29 | @@ -2360,6 +2360,18 @@ hangup: | ||
| 30 | } | ||
| 31 | } | ||
| 32 | |||
| 33 | + /* | ||
| 34 | + * Remove the G_IO_OUT flag from the watch, otherwise we end | ||
| 35 | + * up in a busy loop, because the socket is constantly writable. | ||
| 36 | + * | ||
| 37 | + * There seems to be no better way in g_io to do that than | ||
| 38 | + * re-adding the watch. | ||
| 39 | + */ | ||
| 40 | + g_source_remove(server->watch); | ||
| 41 | + server->watch = g_io_add_watch(server->channel, | ||
| 42 | + G_IO_IN | G_IO_HUP | G_IO_NVAL | G_IO_ERR, | ||
| 43 | + tcp_server_event, server); | ||
| 44 | + | ||
| 45 | server->connected = true; | ||
| 46 | server_list = g_slist_append(server_list, server); | ||
| 47 | |||
| 48 | -- | ||
| 49 | cgit 1.2.3-1.el7 | ||
| 50 | |||
diff --git a/meta/recipes-connectivity/connman/connman_1.37.bb b/meta/recipes-connectivity/connman/connman_1.37.bb index e3ea3cd065..096981364f 100644 --- a/meta/recipes-connectivity/connman/connman_1.37.bb +++ b/meta/recipes-connectivity/connman/connman_1.37.bb | |||
| @@ -10,6 +10,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \ | |||
| 10 | file://CVE-2021-26676-0001.patch \ | 10 | file://CVE-2021-26676-0001.patch \ |
| 11 | file://CVE-2021-26676-0002.patch \ | 11 | file://CVE-2021-26676-0002.patch \ |
| 12 | file://CVE-2022-23096-7.patch \ | 12 | file://CVE-2022-23096-7.patch \ |
| 13 | file://CVE-2022-23098.patch \ | ||
| 13 | " | 14 | " |
| 14 | 15 | ||
| 15 | SRC_URI_append_libc-musl = " file://0002-resolve-musl-does-not-implement-res_ninit.patch" | 16 | SRC_URI_append_libc-musl = " file://0002-resolve-musl-does-not-implement-res_ninit.patch" |
