Definition
Connection-slot exhaustion is a denial-of-service §1.28 (DoS) condition in which peers hold every connection that a device can keep open at the same time, so that a legitimate peer cannot connect. A connection slot is the memory and radio time that a device reserves for one open connection, and the number of slots is fixed when the device is built. In Bluetooth Low Energy (BLE) §7.1, a connection opens before pairing §7.17 or any other check of who the peer is, so a peer that holds no key can take a slot.
The idea
A small BLE sensor is built with one connection slot. An attacker’s phone connects to it and then sends nothing. The sensor’s software checks a message authentication code §5.7 (a short value that only a holder of a secret key can compute) on every update it receives, and it would reject every forgery. None of these checks runs, because no message arrives. While the attacker’s connection is open the sensor has no free slot, so it stops advertising, that is, it no longer broadcasts the short packets that tell nearby devices it accepts connections. The legitimate updater cannot connect. Every forged update would have been rejected, and the genuine update never arrives. Authentication §1.6 of messages decides which messages the device accepts. It does not decide who may hold the connection.
A restaurant with a single table is a fair picture. A stranger sits down, orders nothing and stays, and the next guest cannot be seated however good the kitchen is. The restaurant can set a rule: order within ten minutes or leave. The rule frees the table, but the stranger can walk straight back in and sit down again before the next guest reaches the table. The picture fails in two respects. Over radio, the stranger returns within a fraction of a second at almost no cost. And the stranger can change the name it gives at the door, because a device address is not proof of identity.
How it works
In BLE, the device that advertises and accepts connections is called the peripheral, and the device that starts a connection is called the central. A connection opens and stays open in five steps.
Advertising. The peripheral broadcasts advertising packets that say it accepts connections.
Connection request. A central answers one of those packets with a connection request, a packet that the Bluetooth specification names
CONNECT_IND. The Link Layer §7.6, the part of each BLE chip that controls the radio and its packets, opens the connection at once. The peripheral’s Link Layer accepts a request from any central that its advertising filter policy allows, and the default policy allows every central. The policy can instead admit only centrals whose device addresses are on a list, which the specification calls the Filter Accept List.Notice to the Host. Only after the connection is open does the Link Layer tell the Host, the protocol software above the Link Layer on which the application runs. The Host cannot refuse the connection; it can only end it afterwards. A slot is now taken. The Link Layer and the Host each hold state for the connection, and the radio reserves a short exchange of packets, called a connection event, once every connection interval §7.7, a fixed period that the central chose.
Security, later. Pairing, the procedure in which two devices agree on encryption keys, runs only if one side starts it. Checks made by the application, such as verifying the authentication code of an update, run later still, on messages that arrive over the open connection.
Keeping the connection alive. The two Link Layers keep exchanging packets at connection events, empty ones when neither side has data. Each packet that arrives restarts the supervision timeout §7.8, the timer that ends a connection after a set time without packets. The supervision timeout detects lost radio contact, not idleness. A peer that stays in range and sends no data therefore keeps its slot for as long as it likes.
Only the Host knows whether a peer has authenticated, so the rules that limit slot exhaustion live in the Host. Each rule gives one guarantee and leaves one gap.
A pre-authentication deadline. When a connection opens, the Host starts a timer of length . If the peer has not authenticated when the timer expires, the Host ends the connection. The peer can authenticate, for example, by encrypting the link with a key stored during an earlier bonding §7.18, or by completing a handshake defined by the application. No unauthenticated connection then lasts much longer than . The gap: the peer can reconnect at once.
Bonded peers only. A device that serves only peers it has bonded with, meaning peers with which it stored keys during an earlier pairing, can use a much shorter deadline, because a bonded peer can start encryption within a few connection events. It can also end the connection at once when encryption with a stored key fails. The gap: accepting new pairings reopens the door, because Just Works §7.22 pairing, the BLE pairing method with no check by a user, succeeds with any peer.
A Filter Accept List. Only listed addresses can connect, which stops casual connections. The gap: a device’s address travels unencrypted in the packets it uses to advertise, scan and connect, so an attacker that records a listed address can send connection requests from it. The list is a filter, not authentication.
More slots, with a cap on unauthenticated connections. With slots, the device lets at most of them be held by connections that have not authenticated. A peer that has already authenticated then keeps its slot whatever the attacker does. The gap: a newly arriving legitimate peer also starts unauthenticated, so it must take one of the places, which the attacker may hold.
Worked example
A peripheral has one slot. The connection interval is 50 ms and the supervision timeout is 4 s.
No rule in the Host. An attacker connects and sends no data. The Link Layers exchange empty packets at every connection event. In one hour there are connection events, and each one restarts the 4 s timer, so the timer never expires. The attacker holds the slot for the whole hour, and the slot is free for 0 s.
A pre-authentication deadline of s. The attacker’s software reconnects s after each disconnection: it waits for the next advertising packet and answers it. One cycle lasts s, and the slot is free only during the 0.2 s gap. The free fraction is , about 2%. One hour holds cycles, so the slot is free for about s in total, in pieces of 0.2 s. The legitimate central gets the slot only if its connection request reaches the peripheral before the attacker’s request in one of those pieces, a race that an attacker who is always listening is well placed to win.
Three slots, at most two of them unauthenticated. Let be the number of slots and the number of slots the attacker holds. The free slots number , where takes the larger of its two values. Without a cap the attacker opens three connections, and slots are free. With the cap the attacker holds at most 2, so slot remains for a peer that has authenticated. A legitimate updater that connected and authenticated before the attack began keeps that slot. One that arrives during the attack must enter as one of the two unauthenticated connections, which the attacker already holds, so it competes for the gaps exactly as in the one-slot case.
Stated precisely
Let be the number of connection slots and the number of slots that peers without authentication hold at a given moment. Then slots are free for anyone else. This counts slots only. A free slot does not guarantee that the device has the radio time, memory or processor time to serve the peer that takes it.
A peer without a key can hold a slot for as long as the Host lets a connection stay open without authentication. With no rule, that time has no limit, because the Link Layers’ empty packets keep the connection alive and the supervision timeout fires only when packets stop arriving. With a pre-authentication deadline , no unauthenticated connection lasts longer than plus the time needed to end it. If the attacker reconnects within seconds of each disconnection, a slot it targets is free for at most the fraction of the time, and a new legitimate peer can connect only during those gaps.
These statements rest on three assumptions.
The attacker cannot authenticate: it holds no key that the device accepts. If the device counts any completed pairing as authentication and accepts Just Works pairing, the attacker can authenticate, and these rules cannot tell it from a legitimate peer.
The Host applies the deadline to every connection, from the moment the connection opens.
Every legitimate peer completes authentication in less than . A deadline shorter than the slowest legitimate authentication, for example one in which a user types a six-digit passkey shown on the other device, disconnects legitimate peers as well.
Limits and common mistakes
Strong message authentication does not protect admission capacity. A device that rejects every forged update can still give no service at all, because the slot was taken before any message was checked. Judge availability §1.10 by whether a legitimate peer gets served while an attacker is active, not by whether forgeries are rejected.
A deadline bounds one connection, not the attack: the attacker takes the slot again a fraction of a second later. A device address is not an identity, because an attacker can copy an address it received over the air. A completed pairing is not an identity either, if the device accepts Just Works pairing from anyone.
No single deadline value is right for every device. A shorter frees slots sooner and cuts off slow legitimate peers. A longer lets each attacker connection last longer.
A slot is not the only cost paid before authentication. A connected peer without a key can also make the device run pairing computations, such as the elliptic-curve §19.1.5 calculations that the Secure Connections pairing method needs, or answer requests that list the device’s services. Each such cost needs its own bound, for example through rate limiting §9.38.
An attacker in radio range can also deny service by jamming, which no rule in the Host prevents. The Jamming versus protocol DoS §7.40 entry separates the two kinds of attack.
Questions answered
Can an unauthenticated peer hold the only available connection?
Yes, an unauthenticated peer can hold a device’s only available connection. A BLE (Bluetooth Low Energy) peripheral’s Link Layer, the part of the chip that controls the radio, opens a connection for any central that its advertising filter allows, before pairing and before any check of the peer’s identity. The Link Layers then keep the connection alive with empty packets whether or not data flows. A peer that holds no key can therefore occupy the only connection slot for as long as the device’s Host software lets an unauthenticated connection stay open, which is indefinitely if the Host sets no deadline. While the slot is taken, the device stops advertising and the legitimate peer cannot connect.
A pre-authentication deadline ends each such connection after a fixed time, but the attacker can reconnect within a fraction of a second and so still holds the slot almost all the time. Serving only bonded peers shortens each occupation, and more slots with a cap on unauthenticated connections protect peers that have already authenticated. None of these lets a new legitimate peer in reliably while an active attacker keeps reconnecting. Authenticating update messages changes none of this: message authentication decides which messages the device accepts, not who holds the connection.
Related entries: Rate limiting (§9.38), Supervision timeout (§7.8), Denial of service (DoS) (§1.28), Advertising and scanning (§7.3), Pairing (§7.17), Jamming versus protocol DoS (§7.40). Further reading: [93].