Android security tags, read closely by Lightrion

CVE-2024-0032 AI-generated analysis

platform/frameworks/base (com.android.internal.content.FileSystemProvider, packages/ExternalStorageProvider) and platform/packages/providers/DownloadProvider (DownloadStorageProvider), storage access framework / DocumentsProvider

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

Replaces FileSystemProvider's exact-match regex for /Android/{data,obb,sandbox} with an overridable shouldHideDocument(documentId) hook. ExternalStorageProvider implements the hook to hide those directories and their entire subtrees (on non-USB storage) from queryChildDocuments, querySearchDocuments and the open-tree flag. The fix also consolidates the queryChildDocuments variants around a single includeHidden parameter.

Root cause

FileSystemProvider.shouldHide(File) used PATTERN_HIDDEN_PATH, "(?i)^/storage/[^/]+/(?:[0-9]+/)?Android/(?:data|obb|sandbox)$", which matches only the restricted directory itself. queryChildDocuments(parentDocumentId, ...) applied this filter to the queried parent and to each child. A document ID whose path pointed inside one of those directories was therefore not recognised as hidden: the parent check passed and the contents were listed. The check also depended on the absolute path starting with /storage/, not on the canonicalised root-relative path of the document ID. ExternalStorageProvider.shouldBlockFromTree relied on the same shouldHide(dir). FLAG_DIR_BLOCKS_OPEN_DOCUMENT_TREE was only computed for writable directories.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to March 2025 · Findings