mirror of
https://github.com/openwrt/openwrt.git
synced 2025-02-02 17:20:59 +00:00
9bc43f3e65
This fixes the following security problems: * CVE-2017-1000254: FTP PWD response parser out of bounds read * CVE-2017-1000257: IMAP FETCH response out of bounds read * CVE-2018-1000005: HTTP/2 trailer out-of-bounds read * CVE-2018-1000007: HTTP authentication leak in redirects * CVE-2018-1000120: FTP path trickery leads to NIL byte out of bounds write * CVE-2018-1000121: LDAP NULL pointer dereference * CVE-2018-1000122: RTSP RTP buffer over-read * CVE-2018-1000301: RTSP bad headers buffer over-read Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
29 lines
902 B
Diff
29 lines
902 B
Diff
From 13c9a9ded3ae744a1e11cbc14e9146d9fa427040 Mon Sep 17 00:00:00 2001
|
|
From: Daniel Stenberg <daniel@haxx.se>
|
|
Date: Sat, 7 Oct 2017 00:11:31 +0200
|
|
Subject: [PATCH] imap: if a FETCH response has no size, don't call write
|
|
callback
|
|
|
|
CVE-2017-1000257
|
|
|
|
Reported-by: Brian Carpenter and 0xd34db347
|
|
Also detected by OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3586
|
|
---
|
|
lib/imap.c | 5 +++++
|
|
1 file changed, 5 insertions(+)
|
|
|
|
--- a/lib/imap.c
|
|
+++ b/lib/imap.c
|
|
@@ -1140,6 +1140,11 @@ static CURLcode imap_state_fetch_resp(st
|
|
/* The conversion from curl_off_t to size_t is always fine here */
|
|
chunk = (size_t)size;
|
|
|
|
+ if(!chunk) {
|
|
+ /* no size, we're done with the data */
|
|
+ state(conn, IMAP_STOP);
|
|
+ return CURLE_OK;
|
|
+ }
|
|
result = Curl_client_write(conn, CLIENTWRITE_BODY, pp->cache, chunk);
|
|
if(result)
|
|
return result;
|