Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8193c188 authored by Steven Moreland's avatar Steven Moreland
Browse files

libbinder: RPC - add DOS TODO

Reading client ID needs to happen on another thread from the main server
in order to avoid a client freezing the server. Though, before moving
the thread tracking to RpcServer, I want to implement reverse
connections (reverse threadpools for handling callbacks) since this is
the feature that originally motivated the threadpool being handled in
RpcSession.

Bug: 185167543
Test: N/A
Change-Id: I1e862ac098159a6efc3c0736050a0b7fe6e7c57e
parent 4fccd098
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -138,7 +138,8 @@ void RpcServer::join() {
        }
        LOG_RPC_DETAIL("accept4 on fd %d yields fd %d", mServer.get(), clientFd.get());

        // TODO(b/183988761): cannot trust this simple ID
        // TODO(b/183988761): cannot trust this simple ID, should not block this
        // thread
        LOG_ALWAYS_FATAL_IF(!mAgreedExperimental, "no!");
        int32_t id;
        if (sizeof(id) != read(clientFd.get(), &id, sizeof(id))) {