-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Linksys E4200 v2 can't autoupdate due to missing signatures #415
Comments
# uci show autoupdater.next
autoupdater.next=branch
autoupdater.next.mirror='http://firmware.ffmuc.net/next/sysupgrade' 'http://5.1.66.255/next/sysupgrade' 'http://185.150.99.255/next/sysupgrade' 'http://[2001:678:e68:f000::]/next/sysupgrade' 'http://[2001:678:ed0:f000::]/next/sysupgrade'
autoupdater.next.good_signatures='1'
autoupdater.next.name='next'
autoupdater.next.pubkey='6dcfc670a4150e16962c1852066669d9b337f168d0f6a863ed930968c2f047eb' 'dc44c9810a0470b2de63990128dbae392a836f4385d23e57eb72880ea8fbcf16' '5700c7a266d80aa1c6c33f29835a7b200bdd500e88ee86c0a63e24a0023364f6' '216a34d34a15688e127d8d90e6c57587aa8c682b0648322f68338487657fd5ff' '2a74ed02120a7d48bb2dc9be988b3480ed99844054b3d7f3e5d3df27d19d814b' '56c4201f6ce2994678b0142e19099dd28d6ed17775d35ca9a7f12d9235890ffc' '3cc6dc6d0d7499d4d17cacad5f16336634e0b26700807f29cc241eaabbde481f' 'e7a50df4bc8875113eaf75dff5204e8753a9189baeed40c6db0509398a428820' '50bafd8216cab2ee1c11c215b528dd7c6396f3edfdab689c70ca04a9f284b931' 'cc7e3a6a4788d4246075923b298634f14a4fd179020ef6369fb74d601f55cc84' '18fecc717a237ea5702fb97fa4689f9307d0267e3ee8f09377dbed99397b77b9' |
@darkdragon-001 did that change with the new next update? What happens if you execute autoupdater -f |
Nope, everything still the same.
|
What does (should be unrelated to signature verification, but I currently have no idea what might be going wrong for a single device) |
@neocturne isn't this just going to be this? site-ffm/patches/targets-kirkwood.patch Line 18 in e1c1b74
@T0biii edited the initial comment with some more info a few hours ago. |
It should be that if the device entry in the target file is correct, but if I'm looking at the right Device Tree, the device name might actually be set incorrectly and not match the image name. |
Indeed, this has the additional |
Okay, regardless of the naming error, something very weird is going on. As far as I can tell, there is nothing wrong with the autoupdater in the v2024.4.2-next firmware for the Linksys E4200 v2. To verify, I extracted the rootfs from the sysupgrade image, unpacked that in an armsr-armv7 Gluon system running in qemu, and used chroot to run the autoupdater binary + libraries from the extracted rootfs. Depending on the model name I set in |
@darkdragon-001 you can find an updated build for the device with the fixed name around 14:00 CEST here: https://github.com/freifunkMUC/site-ffm/actions/runs/9660907085?pr=446 |
There's one more thing I'd like to check: Please provide the full |
|
Okay, still no idea what is going on... |
This seems very farfetched but could it be that the signature verification instructions don't work on that chip correctly for some reason? |
I guess the first step would be to add some debug logging to the autoupdater (printing the downloaded manifest, SHA256 hash, individual verification inputs and results, maybe some other things I'm forgetting) to narrow down the cause. Once we've done that it might make sense to write a test program for the specific thing that goes wrong. |
@neocturne I can add a bunch of print statements all over the place. Do you mean in the upstream package or as a (temporary) patch in the firmware? |
I have pushed a Gluon branch that includes a debug patch for the autoupdater: https://github.com/neocturne/gluon/tree/autoupdater-debug Run As the patch is rather small, it might also make sense to include it in the upstream autoupdater in the future. |
@darkdragon-001 you will find a new firmware with the above patch by 16:30 CEST: https://github.com/freifunkMUC/site-ffm/actions/runs/9808595276 @neocturne I added this on top of Gluon v2023.2.3 and it seemed to apply cleanly: 67821f7 |
Thanks for your help! @neocturne I extracted the |
Huh. Calculating 4 different incorrect SHA256 hashes for the same manifest from 4 mirrors - even though the manifest is transferred correctly, and fed into |
I've updated my |
I also have a new idea what might be cause of the issue (and a possible fix), but let's wait for the log with the current version first. |
I added the updated @darkdragon-001 the build for the new firmware can be found here: https://github.com/freifunkMUC/site-ffm/actions/runs/10655791524 |
I got a Linksys EA4500 here now and could reproduce the SHA256 issue, so I should be able find the root cause soon. |
Will be fixed by freifunk-gluon/ecdsautils#1 |
Fix is in Gluon master now, will be added to v2023.2.x with freifunk-gluon/gluon#3352 |
The Autoupdater on a Linksys E4200 v2 is unable to validate (valid) signatures of the firmware manifest.
gluon: gluon-v2023.2.2+
ffmuc: v2024.4.2-next
Patch: https://github.com/freifunkMUC/site-ffm/blob/next/patches/targets-kirkwood.patch
https://map.ffmuc.net/#!/de/map/586d8ff5af6f
The text was updated successfully, but these errors were encountered: