Android security tags, read closely by Lightrion

CVE-2026-28594 AI-generated analysis

platform/frameworks/base, android.util.MemoryIntArray (Java + core/jni/android_util_MemoryIntArray.cpp); platform/system/core, libcutils ashmem-dev.cpp

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.

Makes MemoryIntArray pass one explicit element count from Java to both nativeOpen and nativeClose so mmap and munmap always use the same length instead of re-querying the fd's ashmem size, and hardens libcutils ashmem_valid() so a memfd is only accepted as an ashmem replacement when it carries both F_SEAL_GROW and F_SEAL_SHRINK.

Root cause

In core/jni/android_util_MemoryIntArray.cpp, android_util_MemoryIntArray_open called ashmem_get_size_region(fd) to choose the mmap length, and android_util_MemoryIntArray_close called ashmem_get_size_region(fd) again to choose the munmap length. Nothing tied the two values together. If the size reported for the fd was different at close time (the fd's backing region changed size, or a different fd was in mFd), munmap(ashmemAddr, newSize) unmapped a range that did not match the original mapping. Separately, libcutils is_memfd_fd() (used by ashmem_valid()) accepted any fd whose /proc/self/fd link started with "/memfd:", regardless of file seals. A memfd whose size could still change was therefore treated as a valid ashmem fd, which the commit message says opens time-of-check to time-of-use issues.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to September 2026 · Findings