Dropbear fails to start with empty key

Bug #1564948 reported by Hugh Saunders on 2016-04-01
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Hugh Saunders

Bug Description

If one of the key files in /etc/dropbear is empty, dropbear fails to start, but the init script reports that the daemon started ok.

$ tail -f /var/log/messages &
$ > /etc/dropbear/dropbear_rsa_host_key
$ /etc/init.d/S50dropbear restart
Stopping dropbear sshd: OK
Starting dropbear sshd: OK
Apr 1 15:55:34 cirros authpriv.info dropbear[428]: Premature exit: Terminated by signal
Apr 1 15:55:34 cirros authpriv.info dropbear[431]: Premature exit: Bad buf_getptr

I appreciate that the keyfile shouldn't be emtpy, but in the case that it is, the init script should probably notice that and generate a valid one. This should probably be expanded to the more general whenever a key file isn't valid. This could be tested with the dropbearkey utility.

Related branches

Changed in cirros:
assignee: nobody → Hugh Saunders (hughsaunders)
description: updated
Changed in cirros:
status: New → In Progress
Scott Moser (smoser) on 2016-06-29
Changed in cirros:
importance: Undecided → Medium
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers