From b0221d1a8ee6d634b238361188c938e339d6083a Mon Sep 17 00:00:00 2001 From: Frederick Mayle Date: Mon, 3 Oct 2022 23:10:53 +0000 Subject: libbinder: Fix FD handling for queued oneway RPC transactions If a oneway transaction contained FDs and got queued, we'd drop the FDs and then the Parcel validation would fail with an error once the transaction was eventually processed. Bug: 244484370 Test: m libbinder binderRpcTest && out/host/linux-x86/nativetest64/binderRpcTest/binderRpcTest Change-Id: I781d851d875d496c8b57e3512f3f89c9911e9f3c --- libs/binder/RpcState.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libs/binder/RpcState.cpp') diff --git a/libs/binder/RpcState.cpp b/libs/binder/RpcState.cpp index c0e36c4322..a964067f73 100644 --- a/libs/binder/RpcState.cpp +++ b/libs/binder/RpcState.cpp @@ -886,6 +886,7 @@ processTransactInternalTailCall: it->second.asyncTodo.push(BinderNode::AsyncTodo{ .ref = target, .data = std::move(transactionData), + .ancillaryFds = std::move(ancillaryFds), .asyncNumber = transaction->asyncNumber, }); @@ -1046,6 +1047,7 @@ processTransactInternalTailCall: // reset up arguments transactionData = std::move(todo.data); + ancillaryFds = std::move(todo.ancillaryFds); LOG_ALWAYS_FATAL_IF(target != todo.ref, "async list should be associated with a binder"); -- cgit v1.2.3-59-g8ed1b