Android security tags, read closely by Lightrion

CVE-2024-0017 AI-generated analysis

platform/packages/apps/Camera2, CameraActivity location/EXIF handling

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 (4 corrections). Verify against the commit before relying on it.

Camera2's CameraActivity.shouldUseNoOpLocation() now returns true (use a no-op location) for a capture intent with no calling package (launched via startActivity rather than startActivityForResult). Otherwise it evaluates Camera2's own package permissions, instead of returning false whenever getCallingPackage() was null.

Root cause

shouldUseNoOpLocation() decides whether captured images get valid location in EXIF by checking the calling package's ACCESS_FINE_LOCATION grant. It relied on getCallingPackage(), which per the code comment is only set when the activity is started through startActivityForResult. When it returned null, the function returned false (do not use no-op location). A capture intent sent with plain startActivity also gives a null calling package. Per the commit message, Camera2 therefore unconditionally granted location to such starters, whatever location permission they held.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to January 2024 · Findings