diff options
| author | CoprDistGit <infra@openeuler.org> | 2026-10-09 04:32:42 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2026-10-09 04:32:42 +0000 |
| commit | 9c3fcbb8a6a23e186b8ff01cf340f44718f3d99f (patch) | |
| tree | ac7c4824af91d3c53deb8f01889b30b1b0608819 /0004-Fix-SEGV-in-MultipartReader.patch | |
| parent | 41936b67e71421b860447cc1987b82194dfb627e (diff) | |
automatic import of pocoopeneuler24.03_LTS
Diffstat (limited to '0004-Fix-SEGV-in-MultipartReader.patch')
| -rw-r--r-- | 0004-Fix-SEGV-in-MultipartReader.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/0004-Fix-SEGV-in-MultipartReader.patch b/0004-Fix-SEGV-in-MultipartReader.patch new file mode 100644 index 0000000..b91549f --- /dev/null +++ b/0004-Fix-SEGV-in-MultipartReader.patch @@ -0,0 +1,37 @@ +From 6f2f85913c191ab9ddfb8fae781f5d66afccf3bf Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?G=C3=BCnter=20Obiltschnig?= <guenter.obiltschnig@appinf.com> +Date: Wed, 16 Apr 2025 09:15:33 +0200 +Subject: [PATCH] fix(Net): A SEGV at Net/src/MultipartReader.cpp:164:1 #4915 + (move assertion out of ctor) + + +Backport of upstream commit 6f2f85913c191ab9ddfb8fae781f5d66afccf3bf +(included in pocoproject/poco release 1.14.2). +Fixes CVE-2025-6375: null pointer dereference in MultipartInputStream +(Net/src/MultipartReader.cpp). + +--- + Net/src/MultipartReader.cpp | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/Net/src/MultipartReader.cpp b/Net/src/MultipartReader.cpp +index f3a2f2bba2..f4aa27dd86 100644 +--- a/Net/src/MultipartReader.cpp ++++ b/Net/src/MultipartReader.cpp +@@ -36,7 +36,6 @@ MultipartStreamBuf::MultipartStreamBuf(std::istream& istr, const std::string& bo + _boundary(boundary), + _lastPart(false) + { +- poco_assert (!boundary.empty() && boundary.length() < STREAM_BUFFER_SIZE - 6); + } + + +@@ -47,7 +46,7 @@ MultipartStreamBuf::~MultipartStreamBuf() + + int MultipartStreamBuf::readFromDevice(char* buffer, std::streamsize length) + { +- poco_assert_dbg (length >= _boundary.length() + 6); ++ poco_assert (!_boundary.empty() && _boundary.length() < length - 6); + + static const int eof = std::char_traits<char>::eof(); + std::streambuf& buf = *_istr.rdbuf(); |
