Blog / A09:2021 Security Logging and Monitoring Failures
A09:2021 · Security Logging and Monitoring Failures

Every BLE notification writes a byte to the system log

The first byte of every packet from the peripheral goes to a shared log any app or operator can read. If that byte means something, it just left your app.

peripheral sendsnotificationfirst byteextractedwritten to sharedlogreadable by otherprocessesATTACKER INPUTIMPACTwritten to logs
Attack path · peripheral sends notification → first byte extracted → written to shared log → readable by other processes

The first byte of every packet from the peripheral goes to a shared log any app or operator can read. If that byte means something, it just left your app.

What goes wrong

Every time the peripheral pushes a notification, the code peels off the first byte and writes it to the device's shared log. Useful while you are bringing up the protocol. A problem once you ship, because that log is not yours alone.

One byte sounds harmless until you think about what the first byte usually is. It is a type tag or a status flag. Sometimes it is a sequence counter, or the high bits of an identifier. Log it on every packet and you hand an observer a running trace of the link.

On older platform versions any app with the right permission could read that log. Tooling and operators still can. Low severity, but a habit worth breaking, because debug logging on a hot path tends to outlive the debugging.

The pattern

Vulnerable
void onNotification(byte[] data) {
  log('notify byte=' + data[0]);
  handle(data);
}
Hardened
void onNotification(byte[] data) {
  if (debugBuild) {
    log('notify len=' + data.length);
  }
  handle(data);
}
How the pipeline adjudicated itPROVEN
ABCDEFGH

Every gate held. The exploit path was reproduced against a negative control, the impact was calibrated, and the finding was signed report-ready.

Ed25519 · per-tenant signing key · gate ledger A–H · verify offline against the published payload hash

Why it matters to you

Anything on a wireless link that you log per packet is a side channel. You may decide one byte is fine to expose. Make that an actual decision, not a leftover from bring-up. The teams that get burned here logged 'just the header' and forgot the header carried a token.

Check your own code