rgw: improve beast
authorOr Friedmann <ofriedma@redhat.com>
Wed, 15 Jan 2020 19:15:53 +0000 (21:15 +0200)
committerBastien Roucariès <rouca@debian.org>
Sat, 21 Oct 2023 16:42:26 +0000 (17:42 +0100)
Avoid leaking connections that had partially-consumed
client data on unexpected disconnect.

Resolves CVE-2020-1700 (moderate impact flaw).

Fixes: https://tracker.ceph.com/issues/42531
Signed-off-by: Or Friedmann <ofriedma@redhat.com>
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Origin: upstream, https://github.com/ceph/ceph/commit/ff72c50a2c43c57aead933eb4903ad1ca6d1748a

Gbp-Pq: Name CVE-2020-1700.patch

src/rgw/rgw_asio_frontend.cc

index d2dedd00461c8566481ae74f9944a1efe243f92d..0ccc46dd99cab3b119abc853376c98e7234a9a20 100644 (file)
@@ -104,8 +104,7 @@ class StreamIO : public rgw::asio::ClientIO {
     while (body_remaining.size && !parser.is_done()) {
       boost::system::error_code ec;
       beast::http::read_some(stream, buffer, parser, ec);
-      if (ec == beast::http::error::partial_message ||
-          ec == beast::http::error::need_buffer) {
+      if (ec == beast::http::error::need_buffer) {
         break;
       }
       if (ec) {