summaryrefslogtreecommitdiff
path: root/libs/binder/RpcServer.cpp
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2021-06-10 23:35:35 +0000
committer Steven Moreland <smoreland@google.com> 2021-06-12 00:22:10 +0000
commit915382439c1db7768c48cbecb235bfc57a9b6437 (patch)
tree93d00fc64c4a223d1c197aa19c2cee293e06c3fd /libs/binder/RpcServer.cpp
parent7b8bc4c6997c45c8f896e16537f7abc61fe3ac2e (diff)
libbinder: RPC prevent binder address collision
It's not clear that we're going to continue using such large addresses (they are expensive, and we don't actually need addresses themselves to be cryptographically unguessable - also since we are reading from urandom, we're using a lot of entropy - ...), but just in case, clearing out TODOs (and also in preparation of using RpcAddress for something else, which we probably will continue using). This prevents address collision by doing two things: - create a bitspace for server vs client addresses (one bit in the address, in a newly defined header, determines the originating side of the connection for the address). - instead of aborting when a duplicated address is created, try to create a new one. As a side-effect, this also adds a header to binder RPC addresses. Bug: 182939933 Test: binderRpcTest Change-Id: I8ff0d29ca6df25b3f1d9662978fccbb3eb76c8ad
Diffstat (limited to 'libs/binder/RpcServer.cpp')
0 files changed, 0 insertions, 0 deletions