narmstrong changed the topic of #linux-amlogic to: Amlogic mainline kernel development discussion - our wiki http://linux-meson.com/ - ml linux-amlogic@lists.infradead.org - official channel moved from Freenode - publicly logged on https://libera.irclog.whitequark.org/linux-amlogic
vagrantc has quit [Quit: leaving]
naoki has joined #linux-amlogic
konsgn has joined #linux-amlogic
konsgn has quit [Client Quit]
konsgn has joined #linux-amlogic
Daanct12 has joined #linux-amlogic
zxdd_ has quit [Ping timeout: 268 seconds]
zxdd has joined #linux-amlogic
montjoie has quit [Ping timeout: 265 seconds]
Daanct12 has quit [Quit: WeeChat 4.5.1]
hexdump0815 has quit [Ping timeout: 252 seconds]
hexdump0815 has joined #linux-amlogic
naoki has quit [Quit: naoki]
montjoie has joined #linux-amlogic
Daanct12 has joined #linux-amlogic
buzzmarshall has quit [Quit: Konversation terminated!]
<adeepn> f_: incredible work!
zxdd has quit [Ping timeout: 252 seconds]
zxdd has joined #linux-amlogic
Daanct12 has quit [Quit: WeeChat 4.5.1]
Daanct12 has joined #linux-amlogic
xdarklight has quit [Quit: ZNC - https://znc.in]
xdarklight has joined #linux-amlogic
Daanct12 has quit [Quit: WeeChat 4.5.1]
Daanct12 has joined #linux-amlogic
djrscally has joined #linux-amlogic
naoki has joined #linux-amlogic
Daanct12 has quit [Quit: WeeChat 4.5.1]
Daanct12 has joined #linux-amlogic
konsgn has quit [Remote host closed the connection]
konsgn3 has joined #linux-amlogic
naoki has quit [Quit: naoki]
<f_> adeepn: oh, thank you :)
<f_> All this on the TV Stick wouldn't be possible without Frédéric's amazing work finding the USB vuln in the first place :)
<f_> And me reversing BL2 and getting it booting on both gxbb and gxl SoCs wouldn't be possible without the kind people that sent me boards to play with
<f_> Thank you all <3
<f_> (and yes, I still want to get it booting on g12b/sm1!)
paulk-bis has quit [Quit: WeeChat 3.0]
paulk has joined #linux-amlogic
<Daanct12> so now you can retrieve the keys on many amlogic boards and.. basically become the manufacturer?
<f_> Daanct12: not exactly
<f_> Usually there's still RSA on the way
<Daanct12> hmm
<Daanct12> so how do you even sideload the image
<f_> you use the usbdl vulnerability
<Daanct12> if you didn't exactly get the key
<f_> Thanks to that vuln you can basically bypass all checks (yes, including @AML header checks) and jump directly to the payload
<f_> ok, to summarise:
<Daanct12> aaaaah, so basically it's like the nintendo switch?
<Daanct12> like.. you can only bypass the bootrom's signature check
<f_> this means I can load unsigned code via USB and bypass verification checks
<f_> *however* this is not enough to bypass verification checks when booting from eMMC
<f_> Thanks to secureboot (heh) everything fw-related on the eMMC is stored encrypted. However, thanks to that vuln I can simply write a payload that dumps the AES key and IV from the OTP
<f_> and I did. I got the AES key xiaomi uses on their sticks
<Daanct12> understood, basically it's the same way how the nintendo switch bootrom exploit works
<f_> However, an AES key is not enough for the bootROM to load whatever you want from eMMC, as the BL2 is signed with RSA
<Daanct12> what level of RSA are we talking about
<f_> I think xiaomi used rsa-1024
<f_> According to the @KEY headers I found in my decrypted BL2 dump
<f_> and also according to the UART:
<f_> aml log : R1024 check pass!
<Daanct12> mhmm
<Daanct12> is RSA-1024 cracked yet
<f_> ¯\_(ツ)_/¯
<Daanct12> i looked around but it's all mixed
<f_> and tbh I don't care all that much
<Daanct12> some say it is, some say it isn't, and microsoft dropped rsa-1024 support a year ago
<f_> The goal has been to do all this without touching the eMMC
<f_> The only thing I ever touched on the stick's eMMC are the vendor u-boot's env, which I modified to boot postmarketOS from USB
<Daanct12> i'm so glad that my beelink gt-king doesn't have secure boot :D
<f_> :D
<Daanct12> i can boot from an sd card
<Daanct12> which is great
<f_> Sadly booting from SD card on the TV stick is not an option :p
<Daanct12> oh right
<f_> for a very simple reason
<Daanct12> i should try to build the amlogic jig
<f_> (there's no sd card reader on the thing xD)
<Daanct12> xD
<Daanct12> the amlogic jig should be easy to build
<Daanct12> the issue is finding parts
<Daanct12> ree
<Daanct12> and also
<Daanct12> i suck at soldering
<f_> same
<Daanct12> yeah.. the best i could do is soldering microcontroller pins
<Daanct12> :\
<Daanct12> so the good thing is
<Daanct12> i can probably target any amlogic devices pre-2020
<f_> Daanct12: pre-2023
<Daanct12> ah
<f_> Anything older than S905D3
<Daanct12> i guess they fixed this on all silicons?
<f_> or S905D3 itself
<Daanct12> even if they're still in production
<f_> It's at the bootROM level, and so far I haven't seen any bootROMs in the wild with it fixed
<f_> Daanct12: but to mitigate it you can basically either disable USB mode entirely or lock it behind a password
<Daanct12> by... efuses?
<f_> yep
<Daanct12> better hope manufacturers doesn't start doing that
<f_> google has already started doing that
<Daanct12> make sense
<f_> And actually it's pre-2021 .. typo lol
<Daanct12> i guess the fuse is blown after an update
<f_> Daanct12: correct
rellla has quit [Quit: ZNC 1.6.5+deb1+deb9u2 - http://znc.in]
ldevulder_ has joined #linux-amlogic
ldevulder has quit [Read error: Connection reset by peer]
<Daanct12> f_: wanna see something funny i found while reading kernel source
<f_> sure
<Daanct12> read drivers/power/reset/odroid-go-ultra-poweroff.c
<f_> I clearly haven't read enough downstream code today
<Daanct12> no it's mainline
<f_> ah
<Daanct12> written by narmstrong :)
<Daanct12> you'll find the funny thing by reading the comment at the beginning of the code
<narmstrong> I wasn't proud of this one, but it's the only way to poweroff this thing
<f_> lol
<f_> poweroff driver
<Daanct12> the funny thing here is that
<Daanct12> they use rockchip on an amlogic device
<f_> yeah I saw "RK" and I was .."wut"
<Daanct12> i was totally expecting a rockchip board.. not this
<Daanct12> xD
<Daanct12> but the most cursed thing is that they use two of them
<f_> yep
<f_> 2x "wut"
<f_> xD
<Daanct12> makes me wondering how power hungry the board is
<Daanct12> both pmic can do battery management btw
<narmstrong> one pmic did not provide enough power lanes
<narmstrong> and other pmics were probably too expensive
<f_> Why one when you could have two?
<f_> odroid go ultra 4: we added 3 more pmic's
<narmstrong> perhaps they had a box full of those pmics
<Daanct12> likely thats what happening
<Daanct12> or maybe the device was being designed during the pandemic and they can't get the good ones
<Daanct12> as in they're too expensive/out of stock
<Daanct12> gotta get off soon for the day.. :\
Daanct12 has quit [Quit: WeeChat 4.5.1]
ndufresne has joined #linux-amlogic
mripard has quit [Quit: WeeChat 4.5.1]
vagrantc has joined #linux-amlogic
buzzmarshall has joined #linux-amlogic
jacobk_ has joined #linux-amlogic
jacobk_ has quit [Ping timeout: 276 seconds]
jacobk has joined #linux-amlogic
b0 has quit [Read error: Connection reset by peer]
b0 has joined #linux-amlogic
exkc has quit [Ping timeout: 260 seconds]
f_[x] has quit [Ping timeout: 260 seconds]
ldevulder_ has quit [Quit: Leaving]
naoki has joined #linux-amlogic
djrscally has quit [Ping timeout: 248 seconds]