Assert Parcel not in pool when used.
Parcel lifetime, according to its API contract, ends when Parcel.recycle() is called. However, sometimes people use it after this point, especially in exception handling and other complex code. This causes what is effectively a UAF issue, as the ownership of that Parcel may be opened for another user in the same process. In order to resolve this, whenever a Parcel is used while it is in the poll, we consider this an error. Yes, this was annoying to add, but every public non-static entry-point into the class is qualified like this. Bug: 381155347 Test: boot Flag: EXEMPT security fix Change-Id: I6abe40c89d3219a312d1a9374ed9f855f49d834d
Loading
Please register or sign in to comment