summaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
Diffstat (limited to 'meta-networking')
-rw-r--r--meta-networking/recipes-support/wireshark/files/CVE-2024-2955.patch52
-rw-r--r--meta-networking/recipes-support/wireshark/wireshark_3.4.12.bb1
2 files changed, 53 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/wireshark/files/CVE-2024-2955.patch b/meta-networking/recipes-support/wireshark/files/CVE-2024-2955.patch
new file mode 100644
index 0000000000..347943d422
--- /dev/null
+++ b/meta-networking/recipes-support/wireshark/files/CVE-2024-2955.patch
@@ -0,0 +1,52 @@
1From 6fd3af5e999c71df67c2cdcefb96d0dc4afa5341 Mon Sep 17 00:00:00 2001
2From: John Thacker <johnthacker@gmail.com>
3Date: Wed, 6 Mar 2024 20:40:42 -0500
4Subject: [PATCH] t38: Allocate forced defragmented memory in correct scope
5
6Fragment data can't be allocated in pinfo->pool scope, as it
7outlives the frame. Set it to be freed when the associated tvb
8is freed, as done in the main reassemble.c code.
9
10Fix #19695
11
12CVE: CVE-2024-2955
13Upstream-Status: Backport [https://gitlab.com/wireshark/wireshark/-/commit/6fd3af5e999c71df67c2cdcefb96d0dc4afa5341]
14Signed-off-by: Ashish Sharma <asharma@mvista.com>
15
16 epan/dissectors/asn1/t38/packet-t38-template.c | 3 ++-
17 epan/dissectors/packet-t38.c | 3 ++-
18 2 files changed, 4 insertions(+), 2 deletions(-)
19
20diff --git a/epan/dissectors/asn1/t38/packet-t38-template.c b/epan/dissectors/asn1/t38/packet-t38-template.c
21index 7b856626865..526b313d054 100644
22--- a/epan/dissectors/asn1/t38/packet-t38-template.c
23+++ b/epan/dissectors/asn1/t38/packet-t38-template.c
24@@ -325,8 +325,9 @@ force_reassemble_seq(reassembly_table *table, packet_info *pinfo, guint32 id)
25 last_fd=fd_i;
26 }
27
28- data = (guint8 *) wmem_alloc(pinfo->pool, size);
29+ data = (guint8 *) g_malloc(size);
30 fd_head->tvb_data = tvb_new_real_data(data, size, size);
31+ tvb_set_free_cb(fd_head->tvb_data, g_free);
32 fd_head->len = size; /* record size for caller */
33
34 /* add all data fragments */
35diff --git a/epan/dissectors/packet-t38.c b/epan/dissectors/packet-t38.c
36index ca95ae8b64e..5083c936c5a 100644
37--- a/epan/dissectors/packet-t38.c
38+++ b/epan/dissectors/packet-t38.c
39@@ -355,8 +355,9 @@ force_reassemble_seq(reassembly_table *table, packet_info *pinfo, guint32 id)
40 last_fd=fd_i;
41 }
42
43- data = (guint8 *) wmem_alloc(pinfo->pool, size);
44+ data = (guint8 *) g_malloc(size);
45 fd_head->tvb_data = tvb_new_real_data(data, size, size);
46+ tvb_set_free_cb(fd_head->tvb_data, g_free);
47 fd_head->len = size; /* record size for caller */
48
49 /* add all data fragments */
50--
51GitLab
52
diff --git a/meta-networking/recipes-support/wireshark/wireshark_3.4.12.bb b/meta-networking/recipes-support/wireshark/wireshark_3.4.12.bb
index 41c363ad30..75c3532834 100644
--- a/meta-networking/recipes-support/wireshark/wireshark_3.4.12.bb
+++ b/meta-networking/recipes-support/wireshark/wireshark_3.4.12.bb
@@ -29,6 +29,7 @@ SRC_URI += " \
29 file://CVE-2022-4345.patch \ 29 file://CVE-2022-4345.patch \
30 file://CVE-2024-0208.patch \ 30 file://CVE-2024-0208.patch \
31 file://CVE-2023-4511.patch \ 31 file://CVE-2023-4511.patch \
32 file://CVE-2024-2955.patch \
32" 33"
33 34
34UPSTREAM_CHECK_URI = "https://1.as.dl.wireshark.org/src" 35UPSTREAM_CHECK_URI = "https://1.as.dl.wireshark.org/src"