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
void onNotification(byte[] data) {
log('notify byte=' + data[0]);
handle(data);
}void onNotification(byte[] data) {
if (debugBuild) {
log('notify len=' + data.length);
}
handle(data);
}Every gate held. The exploit path was reproduced against a negative control, the impact was calibrated, and the finding was signed report-ready.
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
- Search notification and read callbacks for any log line that includes packet bytes.
- Gate every wireless-path log behind a debug build check.
- Decide per field what is safe to log, and log names not raw bytes.
- Confirm release builds strip or disable these logs.