Android security tags, read closely by Lightrion

CVE-2024-34742 AI-generated analysis

platform/frameworks/base, services/devicepolicy (device policy owner state persistence, OwnersData)

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 DeviceOwnerReadWriter.shouldWrite() in OwnersData always return true, so the device owner persistence file (device_owners2.xml) is always written. Before, it was written only when a device owner, system update policy or system update info was set.

Root cause

In services/devicepolicy/java/com/android/server/devicepolicy/OwnersData.java, DeviceOwnerReadWriter.shouldWrite() returned true only if mDeviceOwner, mSystemUpdatePolicy or mSystemUpdateInfo was non-null. writeInner() also serializes other state. mDeviceOwnerTypes (TAG_DEVICE_OWNER_TYPE entries) is visible, and there is more content after line 385 that the material does not show. If the three checked fields were all null while other state existed, shouldWrite() returned false and the file was not written, so that state was not persisted. The commit was tested by upgrading from T-QPR3 ("Test: Manual, upgrading from T-QPR3").

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to August 2024 · Findings