diff options
Diffstat (limited to 'meta/recipes-support/curl/curl/CVE-2021-22945.patch')
-rw-r--r-- | meta/recipes-support/curl/curl/CVE-2021-22945.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/meta/recipes-support/curl/curl/CVE-2021-22945.patch b/meta/recipes-support/curl/curl/CVE-2021-22945.patch new file mode 100644 index 0000000000..44c42632ed --- /dev/null +++ b/meta/recipes-support/curl/curl/CVE-2021-22945.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From 43157490a5054bd24256fe12876931e8abc9df49 Mon Sep 17 00:00:00 2001 | ||
2 | From: z2_ on hackerone <> | ||
3 | Date: Tue, 24 Aug 2021 09:50:33 +0200 | ||
4 | Subject: [PATCH] mqtt: clear the leftovers pointer when sending succeeds | ||
5 | |||
6 | CVE-2021-22945 | ||
7 | |||
8 | Bug: https://curl.se/docs/CVE-2021-22945.html | ||
9 | |||
10 | Upstream-Status: Backport [https://github.com/curl/curl/commit/43157490a5054bd24256fe12876931e8abc9df49] | ||
11 | |||
12 | Signed-off-by: Robert Joslyn <robert.joslyn@redrectangle.org> | ||
13 | |||
14 | --- | ||
15 | lib/mqtt.c | 4 ++++ | ||
16 | 1 file changed, 4 insertions(+) | ||
17 | |||
18 | diff --git a/lib/mqtt.c b/lib/mqtt.c | ||
19 | index f077e6c3d..fcd40b41e 100644 | ||
20 | --- a/lib/mqtt.c | ||
21 | +++ b/lib/mqtt.c | ||
22 | @@ -128,6 +128,10 @@ static CURLcode mqtt_send(struct Curl_easy *data, | ||
23 | mq->sendleftovers = sendleftovers; | ||
24 | mq->nsend = nsend; | ||
25 | } | ||
26 | + else { | ||
27 | + mq->sendleftovers = NULL; | ||
28 | + mq->nsend = 0; | ||
29 | + } | ||
30 | return result; | ||
31 | } | ||
32 | |||
33 | -- | ||
34 | 2.34.1 | ||
35 | |||