Connect with us

Hi, what are you looking for?

SecurityWeekSecurityWeek

Vulnerabilities

Predictable SSH Host Key Flaw Affects Raspberry Pi Devices

Some Raspberry Pi devices are affected by a security issue stemming from the Raspbian operating system generating weak and predictable SSH keys.

Some Raspberry Pi devices are affected by a security issue stemming from the Raspbian operating system generating weak and predictable SSH keys.

In a post on the Raspberry Pi forums, developer “oittaa” revealed that the hardware random number generator was not enabled in Raspbian by default, which automatically resulted in predictable SSH host keys being generated on the first boot. He also suggested that the issue would reside in the system not being able to seed /dev/urandom before generating SSH keys.

“Raspbian doesn’t enable hardware random number generator by default. This causes generation of predictable SSH host keys on the first boot. As soon as the systems starts up systemd-random-seed tries to seed /dev/urandom, but /var/lib/systemd/random-seed is missing, because it hasn’t been created yet. /etc/rc2.d/S01regenerate_ssh_host_keys is executed, but /dev/urandom pool doesn’t have that much entropy at this point and predictable SSH host keys will be created,” he said.

Based on Debian, the free platform optimized for Raspberry Pi called Raspbian takes advantage of the /dev/urandom function for generating random numbers, the same as Linux does. The function should not depend on the user entropy data, thus making it more popular compared to /dev/random, which generates better random numbers based on user-generated entropy.

Apparently, the /dev/urandom function in Raspbian does not have enough entropy data to work with because the platform tries to generate SSH host keys at boot, and the sequence fails. The operating system generates predictable values, making the SSH keys less secure than they would be should enough entropy data be available.

However, it seems that the Raspbian developers are aware of the entropy issue and are already looking into it, with plans to patch it soon, most probably in the next image, one forum moderator said. Given that the security flaw is being analyzed internally, additional details on the matter are not likely to be provided soon.

To ensure that their devices are kept secure, the owners of Raspberry Pi’s running on Raspbian are advised to update them as soon as a new image is available, which should include a patch for this issue.

As David Holmes, evangelist for F5 Networks’ security solutions, explained in a SecurityWeek column earlier this year, entropy is a must for cryptography because keys are generated from random data. However, he also explains that making up random data to have entropy for system’s random number generator (RNG) is not a good idea either, as the stream can be determined if the initial seed values can be guessed.

Advertisement. Scroll to continue reading.

Holmes also cited a 2009 research paper according to which “between 1 and 2 percent of all SSL keys on the Internet are factorable (and therefore recoverable), largely due to bad entropy. In 2008, a screw-up in the RNG of one of the Debian distributions resulted in only 15 bits of entropy in their keys. This key generation weakness went unnoticed for years.” He also added that “the problem is going to keep happening.”

 

Written By

Click to comment

Trending

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest threats, trends, and technology, along with insightful columns from industry experts.

Join the session as we discuss the challenges and best practices for cybersecurity leaders managing cloud identities.

Register

SecurityWeek’s Ransomware Resilience and Recovery Summit helps businesses to plan, prepare, and recover from a ransomware incident.

Register

Expert Insights

Related Content

Vulnerabilities

Less than a week after announcing that it would suspended service indefinitely due to a conflict with an (at the time) unnamed security researcher...

Data Breaches

OpenAI has confirmed a ChatGPT data breach on the same day a security firm reported seeing the use of a component affected by an...

IoT Security

A group of seven security researchers have discovered numerous vulnerabilities in vehicles from 16 car makers, including bugs that allowed them to control car...

Vulnerabilities

A researcher at IOActive discovered that home security systems from SimpliSafe are plagued by a vulnerability that allows tech savvy burglars to remotely disable...

Risk Management

The supply chain threat is directly linked to attack surface management, but the supply chain must be known and understood before it can be...

Cybercrime

Patch Tuesday: Microsoft calls attention to a series of zero-day remote code execution attacks hitting its Office productivity suite.

Vulnerabilities

Patch Tuesday: Microsoft warns vulnerability (CVE-2023-23397) could lead to exploitation before an email is viewed in the Preview Pane.

Vulnerabilities

The latest Chrome update brings patches for eight vulnerabilities, including seven reported by external researchers.