]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: improve beast
authorOr Friedmann <ofriedma@redhat.com>
Wed, 15 Jan 2020 19:15:53 +0000 (21:15 +0200)
committerMatt Benjamin <mbenjamin@redhat.com>
Fri, 31 Jan 2020 15:47:58 +0000 (10:47 -0500)
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>
src/rgw/rgw_asio_frontend.cc

index d8b25cf71f23a25ec769ada95c79796b84315886..fdd96bf32823bb7ee24c1dde07dc6bf4361f036c 100644 (file)
@@ -76,8 +76,7 @@ class StreamIO : public rgw::asio::ClientIO {
     while (body_remaining.size && !parser.is_done()) {
       boost::system::error_code ec;
       http::async_read_some(stream, buffer, parser, yield[ec]);
-      if (ec == http::error::partial_message ||
-          ec == http::error::need_buffer) {
+      if (ec == http::error::need_buffer) {
         break;
       }
       if (ec) {