Android security tags, read closely by Lightrion

CVE-2023-40109 AI-generated analysis

platform/frameworks/base, android.hardware.usb (UsbConfiguration Parcelable)

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

UsbConfiguration.CREATOR.createFromParcel now uses the type-safe Parcel.readParcelableArray(ClassLoader, Class) overload with UsbInterface.class, so a non-UsbInterface element in the interfaces array is rejected when a UsbConfiguration is unparceled.

Root cause

In core/java/android/hardware/usb/UsbConfiguration.java, the Parcelable.Creator read the interfaces array with the untyped in.readParcelableArray(UsbInterface.class.getClassLoader()), which did not restrict elements to UsbInterface. setInterfaces() only runs Preconditions.checkArrayElementsNotNull, and getInterface() casts mInterfaces[index] to UsbInterface, so no element-type check existed on the deserialization path.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to November 2023 · Findings