Android security tags, read closely by Lightrion

CVE-2026-58877 AI-generated analysis

platform/packages/modules/Wifi, Wi-Fi P2P service (WifiP2pServiceImpl, P2pStateMachine)

AI-generated: written from the bulletin and the fixing diffs by claude-fable-5-1, then checked against the code by claude-opus-5-5 (5 corrections). Verify against the commit before relying on it.

The fix makes the "internal message" permission bypass in WifiP2pServiceImpl.P2pStateMachine.checkNearbyDevicesPermission conditional on the sending UID being the Wi-Fi service's own UID (Process.myUid()), so a client-supplied EXTRA_PARAM_KEY_INTERNAL_MESSAGE flag no longer skips the nearby-devices permission check.

Root cause

In service/java/com/android/server/wifi/p2p/WifiP2pServiceImpl.java, P2pStateMachine.checkNearbyDevicesPermission(int uid, String packageName, Bundle extras, String message, Object attributionSource) returned true immediately whenever the extras Bundle contained EXTRA_PARAM_KEY_INTERNAL_MESSAGE == true, skipping both mWifiPermissionsUtil.checkPackage(uid, packageName) and mWifiPermissionsUtil.checkNearbyDevicesPermission(...). The extras Bundle comes from the client's Message (message.getData().getBundle(WifiP2pManager.EXTRA_PARAM_KEY_BUNDLE), see the Message-based overload at lines 5864-5876), so a client able to send a message to the P2P state machine could set that flag and have the nearby-devices permission check bypassed. The flag was intended to mark internal calls, but nothing verified the origin.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to November 2026 · Findings