{Bp 19321} !boards: enforce secure ROMFS passwd and TEA key setup#19348
Conversation
Remove implicit default credentials and add build-time validation. Add check_passwd_keys.sh and gen_passwd_keys.sh; run key setup via passwd_keys.mk before config.h is generated. Mirror the same logic in cmake/nuttx_add_romfs.cmake for CMake builds. BREAKING CHANGE: Builds with CONFIG_BOARD_ETC_ROMFS_PASSWD_ENABLE=y now require an explicit admin password and non-default TEA keys. The Kconfig default password "Administrator" and default TEA keys are no longer accepted. Fix: run make menuconfig, set Admin password under Board Selection -> Auto-generate /etc/passwd, enable random TEA keys or set CONFIG_FSUTILS_PASSWD_KEY1..4 manually, and use NSH login with Encrypted password file verification. Signed-off-by: Abhishek Mishra <mishra.abhishek2808@gmail.com>
|
@cederom ping |
|
@acassis *** Aborting: CONFIG_BOARD_ETC_ROMFS_PASSWD_PASSWORD is not set. Stop. |
|
this is the last patch before RC2 vote |
|
@jerpelea that is the expected behavior when running locally without a defined password, the issue is how to get it working on CI? Maybe we can use kconfig tweak to step a temporary password to make it to pass or simply add this board config to be ignored be the CI |
|
@acassis please merge |
Hmm, or just use random key each time then user does not select its own key? That should improve security and fix the ci errors? :-P |
This is what the gen_passwd_key.sh does, but the error is raised because the config is not set with a password |
|
@acassis do you want to open a PR or we cut RC2 as it is? |
|
I think everything is done! |
Summary
Remove implicit default credentials and add build-time validation. Add check_passwd_keys.sh and gen_passwd_keys.sh; run key setup via passwd_keys.mk before config.h is generated. Mirror the same logic in cmake/nuttx_add_romfs.cmake for CMake builds.
BREAKING CHANGE: Builds with CONFIG_BOARD_ETC_ROMFS_PASSWD_ENABLE=y now require an explicit admin password and non-default TEA keys. The Kconfig default password "Administrator" and default TEA keys are no longer accepted. Fix: run make menuconfig, set Admin password under Board Selection -> Auto-generate /etc/passwd, enable random TEA keys or set CONFIG_FSUTILS_PASSWD_KEY1..4 manually, and use NSH login with Encrypted password file verification.
Impact
RELEASE
Testing
CI