diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2023-09-06 18:56:19 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-09-07 14:36:30 +0100 |
commit | dee8fc6a9757752ea58466a8ec5eaf25275928dc (patch) | |
tree | 712bee9bdeb9b2e56c8487f8981c6a94ce67cca1 /meta/recipes-connectivity/connman/connman/0001-gdhcp-Verify-and-sanitize-packet-length-first.patch | |
parent | 84ba56a144b296e7e8e2f9c7e5c972a57d7d2002 (diff) | |
download | poky-dee8fc6a9757752ea58466a8ec5eaf25275928dc.tar.gz |
connman: update 1.41 -> 1.42
Drop backports. 0001-vpn-Adding-support-for-latest-pppd-2.5.0-release.patch
is partially dropped, as upstream hasn't included the newly added header
into the tarball (issue addressed after the release).
(From OE-Core rev: eeb686876dc560b5f0fab6f37a2def3d78bb55db)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity/connman/connman/0001-gdhcp-Verify-and-sanitize-packet-length-first.patch')
-rw-r--r-- | meta/recipes-connectivity/connman/connman/0001-gdhcp-Verify-and-sanitize-packet-length-first.patch | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/meta/recipes-connectivity/connman/connman/0001-gdhcp-Verify-and-sanitize-packet-length-first.patch b/meta/recipes-connectivity/connman/connman/0001-gdhcp-Verify-and-sanitize-packet-length-first.patch deleted file mode 100644 index 8e2f47a1d5..0000000000 --- a/meta/recipes-connectivity/connman/connman/0001-gdhcp-Verify-and-sanitize-packet-length-first.patch +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | From 99e2c16ea1cced34a5dc450d76287a1c3e762138 Mon Sep 17 00:00:00 2001 | ||
2 | From: Daniel Wagner <wagi@monom.org> | ||
3 | Date: Tue, 11 Apr 2023 08:12:56 +0200 | ||
4 | Subject: [PATCH] gdhcp: Verify and sanitize packet length first | ||
5 | |||
6 | Avoid overwriting the read packet length after the initial test. Thus | ||
7 | move all the length checks which depends on the total length first | ||
8 | and do not use the total lenght from the IP packet afterwards. | ||
9 | |||
10 | Fixes CVE-2023-28488 | ||
11 | |||
12 | Reported by Polina Smirnova <moe.hwr@gmail.com> | ||
13 | |||
14 | CVE: CVE-2023-28488 | ||
15 | Upstream-Status: Backport | ||
16 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
17 | |||
18 | --- | ||
19 | gdhcp/client.c | 16 +++++++++------- | ||
20 | 1 file changed, 9 insertions(+), 7 deletions(-) | ||
21 | |||
22 | diff --git a/gdhcp/client.c b/gdhcp/client.c | ||
23 | index 7efa7e45..82017692 100644 | ||
24 | --- a/gdhcp/client.c | ||
25 | +++ b/gdhcp/client.c | ||
26 | @@ -1319,9 +1319,9 @@ static bool sanity_check(struct ip_udp_dhcp_packet *packet, int bytes) | ||
27 | static int dhcp_recv_l2_packet(struct dhcp_packet *dhcp_pkt, int fd, | ||
28 | struct sockaddr_in *dst_addr) | ||
29 | { | ||
30 | - int bytes; | ||
31 | struct ip_udp_dhcp_packet packet; | ||
32 | uint16_t check; | ||
33 | + int bytes, tot_len; | ||
34 | |||
35 | memset(&packet, 0, sizeof(packet)); | ||
36 | |||
37 | @@ -1329,15 +1329,17 @@ static int dhcp_recv_l2_packet(struct dhcp_packet *dhcp_pkt, int fd, | ||
38 | if (bytes < 0) | ||
39 | return -1; | ||
40 | |||
41 | - if (bytes < (int) (sizeof(packet.ip) + sizeof(packet.udp))) | ||
42 | - return -1; | ||
43 | - | ||
44 | - if (bytes < ntohs(packet.ip.tot_len)) | ||
45 | + tot_len = ntohs(packet.ip.tot_len); | ||
46 | + if (bytes > tot_len) { | ||
47 | + /* ignore any extra garbage bytes */ | ||
48 | + bytes = tot_len; | ||
49 | + } else if (bytes < tot_len) { | ||
50 | /* packet is bigger than sizeof(packet), we did partial read */ | ||
51 | return -1; | ||
52 | + } | ||
53 | |||
54 | - /* ignore any extra garbage bytes */ | ||
55 | - bytes = ntohs(packet.ip.tot_len); | ||
56 | + if (bytes < (int) (sizeof(packet.ip) + sizeof(packet.udp))) | ||
57 | + return -1; | ||
58 | |||
59 | if (!sanity_check(&packet, bytes)) | ||
60 | return -1; | ||
61 | -- | ||
62 | 2.34.1 | ||
63 | |||