Dropbear fails to start with empty key
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
CirrOS |
Fix Committed
|
Medium
|
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/
$ /etc/init.
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
- Scott Moser: Approve
-
Diff: 52 lines (+25/-13)1 file modifiedpatches-buildroot/dropbear-init-generate-keys.patch (+25/-13)
- Scott Moser: Pending requested
-
Diff: 130 lines (+70/-29)4 files modifiedpatches-buildroot/dropbear-init-generate-keys.patch (+0/-27)
patches-buildroot/series (+0/-1)
src/etc/init.d/S50dropbear (+68/-0)
src/etc/init.d/resizefs (+2/-1)
- cirros developers: Pending requested
-
Diff: 74 lines (+68/-0)1 file modifiedsrc/etc/init.d/S50dropbear (+68/-0)
- cirros developers: Pending requested
-
Diff: 74 lines (+68/-0)1 file modifiedsrc/etc/init.d/S50dropbear (+68/-0)
Changed in cirros: | |
assignee: | nobody → Hugh Saunders (hughsaunders) |
description: | updated |
Changed in cirros: | |
status: | New → In Progress |
Changed in cirros: | |
importance: | Undecided → Medium |
status: | In Progress → Fix Committed |