Skip to content
Permalink
Browse files Browse the repository at this point in the history
AcceptRoutingHandler should not assume a folly::AsyncSocket
Summary:
There is no reason to perform a cast to folly::AsyncSocket, when all of the
required behavior is in folly::AsyncTransportWrapper.

CVE-2019-3554

Reviewed By: avasylev

Differential Revision: D13599212

fbshipit-source-id: 3bb5475fe464c04cf5c04115f34e1bcf237cb4aa
  • Loading branch information
mingtaoy authored and facebook-github-bot committed Jan 10, 2019
1 parent 44ef924 commit 3b17ba1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wangle/bootstrap/AcceptRoutingHandler-inl.h
Expand Up @@ -86,8 +86,9 @@ void AcceptRoutingHandler<Pipeline, R>::onRoutingData(

// Fetch the socket from the pipeline and pause reading from the
// socket
auto socket = std::dynamic_pointer_cast<folly::AsyncSocket>(
auto socket = std::dynamic_pointer_cast<folly::AsyncTransportWrapper>(
routingPipeline->getTransport());
CHECK(socket);
routingPipeline->transportInactive();
socket->detachEventBase();

Expand Down

0 comments on commit 3b17ba1

Please sign in to comment.