[U-Boot] Password protection of U-Boot command line

Graeme Russ
2012-02-12T10:03:29Z

Hi Frans,
On 02/11/2012 08:00 PM, Frans Meulenbroeks wrote:
>
> Graeme, if you want to keep people outisde the bootloader in a
> reasonably safe way and are developing your own hardware an option is
> to put the password in e.g. an eeprom and do a compare in u-boot.
> Of course a persistent hacker could retrieve the password but a casual
> user will not be able to enter.
> Having the password in eeprom makes that it is not disclosed with the
> code, it can be changed etc. Just make sure users do not have easy
> (sw) access to the device the password resides in, so e.g.disable
> access one way or another.

The problem is when the 'super secret password' get out into the wild (I
suggest you google 'Stuxnet' - not bootloader related, but highlights the
flaws of 'security by obscurity')

> One other way to prevent accidental access would be a jumper. If
> present no access to u-boot possible at all, if not present access is
> possible. And some stuff on it to view if it is tampered with.
> (if the jumper raises or lowers a gpio device on an i2c chip this can
> be easily detected in a u-boot script and depending on that action
> could be taken).

Yes, a jumper is one idea to prevent command line access as it would
require physical alterations which can be easily detected (stickers for
example)

But what if there as some commands the end-user is safe to use and some
that only the manufacturer should use - Of course the argument would be
that the end-user commands should be in the OS and I would tend to agree

Regards,

Graeme