-
-
Notifications
You must be signed in to change notification settings - Fork 669
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
(Almost) interaction-less firmware update #2919
Comments
can't really: the host could be lying and send one thing first and another thing after going to bootloader. |
@prusnak @andrewkozlik Do you have any thoughts about this? |
I find the proposal in the original comment good. Just one note, there is no devel firmware. What you call a devel firmware is just a firmware with a different vendor (which has the click flag set at the moment). |
interaction-less update RFC: 1. Firmware stage
2. Bootloader stage
For bonus points:Make the interval between erasing firmware and writing first sector shorter.
this shortens the interval when no valid header is present in flash to minimum (i.e., if we allow recovery from corrupted firmware, the only way to lose the header is if the power goes out at exactly the right moment) unfortunately I believe it further complicates the logic of chunk handling. but maybe we could untangle and refactor the current code so that this is achievable? cc @mroz22 for Connect-side review |
Either, or it can simply follow to old process. Device would jump into the bootloader and user will have to confirm the installation there.
If this fails, there is something really wrong, no? Like that host sent different fw to bootloader then to firmware, right?
I believe we can drop this screen and goes directly to "installing firmware" screen? What about displaying fw fingerprint in Firmware stage? Would it be possible? |
That's a weird behavior from code standpoint. Host sends message A and device responds as if the message was B. In this case, if the host insists on doing it, it should react to the failure by re-trying the action via message B explicitly: Host:
This could indicate (a) something wrong with the device, or (b) a broken / malicious firmware. E.g., if a dev firmware tried to initiate upgrade to a signed firmware.
We probably could, but it seems nicer to me to insert "waiting for host" inbetween. Consider a situation when Suite initiates the upgrade, but then has trouble recognizing the Trezor in bootloader mode. In this scenario, Trezor is either stuck "waiting for host" (strictly correct -- Suite isn't talking to it) or "updating firmware" (slightly misleading, the update hadn't actually started)
sure, but what would be the point? |
I meant the situation when e.g. the version is the same or lower than the current one; in that case trezor would jump to bootloader mode but instead immediate installation of new fw user would have to confirm the installation once more (current state)
So probably put there some "Contact support" screen? It should appear only exceptionally, right?
So that users can check the fingerprint prior to installation. |
sooo you would see what? one confirmation of upgrade in firmware (saying what? upgrade/downgrade, target version?) and then another identical one in bootloader mode? what is the usecase, as opposed to "go to bootloader" -> "install firmware" -> confirm? Note that the "strict upgrade" condition is arbitrarily chosen. In terms of hard-security, we could allow anything that has the same vendor. In terms of "UX security", I would be OK with lowering to "upgrade or reinstall". I would still strongly prefer to make the user jump through hoops to do a firmware downgrade, because that always means they could be downgrading to an insecure version.
yes, which is why i wouldn't want to create a completely new screen for it and instead reuse the "generic error" one
I mean, the whole fingerprint verification thing is weird. Is Suite even showing a fingerprint for T2xx models? Again, this can be done (an (i) icon for the upgrade firmware screen), but in terms of UX I would prefer to leave it out, and let the paranoid ones install through bootloader where the fingerprint can be shown. |
The reason i left out "reinstall" originally is that a reinstall is, by default, a strange condition. Reinstall of the same version of firmware is never required: either the firmware is borked, in which case bootloader won't let you start it -- or the firmware is OK, in which case a reinstall is a no-op. |
This is the current flow and it is good for the non-happy path. I was probably confused. 🤨 |
yeah, but then support won't know what has happened. |
Ok, I am fine with leaving fingerprint only when installing through the bootloader. |
@matejkriz @Hermez-cz FYI, this is to be released the next fw release - November. |
#2841 (comment):
Questions:
The whole flow could look like this:
The text was updated successfully, but these errors were encountered: