Android security tags, read closely by Lightrion

CVE-2025-48641 AI-generated analysis

platform/hardware/st/nfc, NFC AIDL HAL (aidl/Nfc.h, struct Nfc : BnNfc, static callbacks eventCallback/dataCallback)

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

In the ST NFC AIDL HAL (platform/hardware/st/nfc, aidl/Nfc.h), the static eventCallback and dataCallback now copy the static shared_ptr Nfc::mCallback into a local std::shared_ptr under a new static pthread mutex sCallbackLock and call sendEvent/sendData on that local strong reference, instead of null-checking and dereferencing the shared static directly.

Root cause

Nfc::eventCallback(uint8_t, uint8_t) and Nfc::dataCallback(uint16_t, uint8_t*) are static functions. They checked the static member shared_ptr 'mCallback' for nullptr and then called mCallback->sendEvent(...) / mCallback->sendData(...) directly on the shared static. According to the commit message, an asynchronous thread running eventCallback called a method on mCallback right after Nfc::open on the main thread had destroyed the underlying object. Because of the race, the simple null check was not enough.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to March 2026 · Findings