| commit | eedc2e6762118f2d19f171b2e4f009c44ed11bfa | [log] [tgz] |
|---|---|---|
| author | Steven Moreland <smoreland@google.com> | Thu Aug 14 17:06:35 2025 -0700 |
| committer | Steven Moreland <smoreland@google.com> | Wed Aug 20 00:39:08 2025 +0000 |
| tree | 5c51988934461711da61889488f70fded70209b6 | |
| parent | 58ac7ea50834f6d5d96169c83302a30c2843f799 [diff] |
Handle exceptions in nativeBinderFromPreconnected.
The `requestFunc` now checks for Java exceptions after calling
`CallIntMethod`. If an exception is detected, a failure flag is
set, and subsequent calls will also fail.
Using stdin like this is typically not going to be a problem,
but it is possible for FD 0 to become a socket for a misbehaving
process, and that could lead to very bad behavior indeed!
Without this change, when failing, we saw this error, due to file no 0 (stdin) being used wrongly:
08-13 06:42:19.997 1730 2806 E libbinder.RpcSession: Could not write connection header to socket: -88 (Socket operation on non-socket)
08-13 06:42:19.999 1730 2806 E libbinder.libbinder_rpc_unstable: Failed to set up preconnected client. error: -88 (Socket operation on non-socket)
With this change, the log we see is this expected error:
08-19 16:37:38.520 24279 7636 E libbinder.libbinder_rpc_unstable: Failed to set up preconnected client. error: BAD_VALUE
Bug: 437940735
Test: test case added, atest com.android.microdroid.test.MicrodroidTests
Change-Id: I181309a7bd1a139517efd7de3b6df02e5e5991f4
Android Virtualization Framework (AVF) provides secure and private execution environments for executing code. AVF is ideal for security-oriented use cases that require stronger isolation assurances over those offered by Android’s app sandbox.
Visit our public doc site to learn more about what AVF is, what it is for, and how it is structured. This repository contains source code for userspace components of AVF.
If you want a quick start, see the getting started guideline and follow the steps there.
For in-depth explanations about individual topics and components, visit the following links.
AVF components:
AVF APIs:
How-Tos: