Fix Android 13+ crash and security exposure in DebugBroadcastReceiver#2
Open
mhdamirhamza wants to merge 1 commit into
Open
Fix Android 13+ crash and security exposure in DebugBroadcastReceiver#2mhdamirhamza wants to merge 1 commit into
mhdamirhamza wants to merge 1 commit into
Conversation
Specifies RECEIVER_NOT_EXPORTED flag for API 33+ devices to prevent SecurityException crashes and block unauthorized local apps from accessing the RIB tree hierarchy dump.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes a critical security and stability issue in
DebugBroadcastReceiver. On Android 13+ (API 33+) devices, dynamically registering a receiver without specifying export flags triggers aSecurityExceptionand crashes downstream applications. Additionally, adding theRECEIVER_NOT_EXPORTEDflag ensures that zero-permission malicious apps cannot broadcast implicit intents to this receiver to dump the internal RIB hierarchy tree.Related issue(s):
None (Found via manual source code security audit).
Test plan:
Verified that the application registers the receiver successfully on Android 13+ devices without throwing a
SecurityExceptionand that local app communication is safely restricted.