Finding Eastereggs in Broadcom's Bluetooth Random Number Generator

Does your Bluetooth chip's RNG produce random numbers? Maybe. Sometimes. It's random.
Does your Bluetooth chip's RNG produce random numbers? Maybe. Sometimes. It's random. The 90 day deadline for CVE-2020-6616 exactly passes during this Easterhegg \o/ According to the Bluetooth specification, the chip is required to contain a proper RNG. This RNG is used for key generation within the chip, but also exposed to the operating system. This is a great feature for embedded devices, which otherwise might not have access to a good RNG. When analyzing the source code of Broadcom's RNG, we found that it accesses a Hardware Random Number Generator (HRNG) but has a Pseudo Random Number Generator (PRNG) fallback. The HRNG looked good at least at first sight, and since it is a black box coming out of some memory mapped hardware registers, it is hard to analyze. It is missing some properties like a warm-up, which means reading out a couple of values during initialization before using it. However, the hardware might also do this internally. Way more interesting is the PRNG, analyzed by @matedealer. The PRNG takes a couple of values which are not random at all. The most random value is the chip's clock. In most contexts within the code that require randomness, the PRNG is called multiple times in a row, thus, the clock is basically constant except from the initial value. Similar issues apply to the other registers and values the PRNG takes as input. The PRNG code was changed multiple times over the years of firmware dumps that we have, such as an additional caching behavior, different input values, etc.—and dropped in the most recent version. On one development board, we found that the RNG function might run into the PRNG when calling it multiple times in a row. However, this seems to be an issue within the RNG cache of that specific development board. When reporting this issue to Broadcom with CVE-2020-6616 already assigned by MITRE, they claimed all their chips had a HRNG and there was no reason ever to use the PRNG. That code was just there but would never be used. However, this is not true, and at least one comparably recent chip of a popular smartphone released in 2017 is missing a HRNG. Ooops :) So we might have something like the KNOB attack here with slightly less entropy reduction but present in the hardware…

Additional information

Type Talk
Language English

More sessions

4/11/20
piko
Feinler
Die offizielle Eröffnung des Chaos.
4/11/20
Julia
Feinler
Offene Daten können helfen, das Klima zu schützen.
4/11/20
qbit
Feinler
Auf unserer Onlineplattform können Studierende Lehrveranstaltungen evaluieren. Dabei sollen Sie anonym Textkommentare abgeben können, doch - welch Überraschung - es ist gar nicht so einfach, dabei alles richtig zu machen.
4/11/20
piko
Feinler
Einige Gedanken über Stimme und wie wir sagen können, was wir sagen wollen.
4/11/20
Florian Hars
Feinler
Ich gebe einen Überblick über die Ideen hinter git und die grundlegenden Datenstrukturen, die es benutzt.
4/11/20
Jan Ruge
Feinler
It is just a broken memcpy in the Bluetooth stack. Do we really need to fix that?
4/11/20
semitone
Feinler
Dieser Talk gibt einen Überblick über die Möglichkeiten von SuperCollider, einem freien Werkzeug für Audiosynthese und algorithmische Komposition.