-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Secure boot failure if silent=1 specified in CONFIG_EXTRA_ENV_SETTINGS #64
Comments
Just an update from my local testing.... If I remove the On a positive note, it does appear that the issue I was seeing in my previous build was likely not related to bootargs and may have been an error in one of my systemd services causing a boot loop due to watchdog timeouts. |
Addition to above from local testing... In my latest testing, it would seem that if I add the This is my current patch being applied that doesn't work.
I also have the following addition to the u-boot configs:
Broken SoM Output:
Output of working non-silent SoM:
I know there have been quite a few changes recently and I am currently pinned to an older manifest (as we are in qualification stage and unable to pull in latest changes until next release cycle). On another note, is the information shown from the working SoM image a cause for concern (I ask as it was raised at our previous security review, but I am wondering if this is actually an issue when we have the hardening enabled in u-boot? |
@MMG-DG Let me try to answer most of your questions:
I don't think adding AFAIU, variable
I think it would be appropriate to switch from
Most (if not all) error and warning messages in U-Boot are printed via printf or puts so that if you redirect or disable the console they won't show up. Even though they are important messages I believe it's assumed that they are relevant most during development or deployment tests where you could have a different setup...
I don't think the information shown on the logs would help an attacker. First because those addresses could be easily obtained from an existing image or even known beforehand from any other image than an attacker could build themselves. Also because the security of the system is not based on memory addresses being unknown. Besides this, once the OS kernel starts running processes cannot normally access physical memory addresses unless they have elevated access and if an attacker has such access it means the system is already compromised.
If you add
So, to avoid changing the kernel's command line you should probably set
There are couple things I'd say are probably wrong that I already mentioned above but I'm not sure which of them would cause the device to reboot. An extra complication is that since you're silence the Linux console messages, it's hard to tell if the reboot is happening during U-Boot's execution of afterwards after the kernel started running (which might have dozens of reasons to reboot).
Mostly answered previously. However let me add here that those various messages are printed during the execution of the command that boots the kernel which is already a point where an attacker wouldn't have much more to do since control is about to be passed to the kernel.
Without protecting the rootfs all of the previous protections are pretty much irrelevant since an attacker would simply attack the unprotected parts of the system... Let me also say that these various warnings (marked with
I wouldn't close a device before ensuring those are solved. |
@rborn-tx - Thanks for the detailed info here. Very useful to help understand what is going on. I have updated my patches to use RE the EEPROM messages:
We are on a custom carrier board which doesn't have an EEPROM (and for our v1 carrier this will not change). RE the other warnings about variable 'i' and 'm', I have not got a clue where these are coming from. This is probably a different tangent, but the other "warning"/"error" that I don't like to see is the following:
Is there something that can be done here so that training succeeds first time? Or is this just an expected thing to happen? Regards, |
I'll see about changing the warning messages about kernel command line mismatch to use stderr instead, but keep in mind that all the other hundreds of possible warning messages produced by U-Boot will still not show up since they are sent to stdout.
I've never seen those messages so I can only imagine this came from some addition of yours to the environment (maybe About the other topics, I'll kindly ask you to go to Toradex' support since they are better prepared to answer them. BR |
Happy Halloween All, So..... In the short term I have reverted back to the previous format, and have an patch for my device lined up to re-introduce the However, I have 2 remaining questions...
Regards, |
Yes, it is certainly possibly to change U-Boot to do this. But U-Boot source code woud need to be changed. About
This is the default configuration that comes from Toradex BSP. You can changed if needed to match your own needs. |
Regarding:
We are currently designing a feature that will do exactly this so as to simplify production fusing. I can't say exactly when it will be available though. |
Using an iMX8MP with kirkstone yocto build (based on tdx-minimal-reference-image)...
Having added
silent=1 loglevel=0 udev.log_level=0
settings to the u-boot environment, Should any critical errors be written to the console.I expect the following line should be changed to print error and not just normal
printf
message to console?0008-toradex-integrate-bootargs-protection-downstream.patch
I assume there is something that can allow this to still be printed as a critical error message?
At least I believe critical errors should still be surfaced? (I have seen Linux kernel errors when they are raised, but nothing from u-boot; maybe the
silent
setting can be removed if theloglevel
one(s) will silence all output except for errors?).The text was updated successfully, but these errors were encountered: