@tj@altelectron.org.uk
@tj@altelectron.org.uk avatar

tj

@tj@altelectron.org.uk

co-host of bsdnow.tv
Militant Internet Engineer, (network|kernel)hacker, adventurist.
#freebsd #wifi MM6IRQ

Consular Officer in the scottishconsulate.org
Cyberpunk and op in #n-o-d-e on libera. Come say hello

This profile is from a federated server and may be incomplete. Browse more on the original instance.

azonenberg, to random
@azonenberg@ioc.exchange avatar

How crazy/horrible/stupid would it be to write a single-pass streaming parser for ELF as part of a firmware updater?

More specifically, you're given a chance to look at each byte of data once. You can either write it to flash immediately, update some local variables (like "offset of .text"), or ignore it.

But once you've seen a given part of the file, you can't rewind and look at it again later (since I'm flashing an image that might be larger than available RAM).

How likely is this to fail in practice? I'm not asking if one of the POC||GTFO editors could craft an ELF that would break this, I'm sure they could. But if I control the linker script generating the file, and have the parser simply refuse to process any file that doesn't play by my rules, am I probably OK?

tj,
@tj@altelectron.org.uk avatar

@azonenberg Does SFTP guarantee that file transfers are correct? TCP only promises that segments are delivered to the receiving application has to ensure they are delivered and processed correctly. Sadly all the layers below will just save corruption in those layers and could easily miss a crash between a valid segment and the data making it to where it needs to go

tj, to random
@tj@altelectron.org.uk avatar

Now I have a 8 second build/test kernel debug cycle having to do a 3 minute clean build is really jarring

tj,
@tj@altelectron.org.uk avatar

@red it is an incremental build, but the 200 second clean build time isn't too bad.

I cannot understand the 40 minute to 3 hour linux kernel builds

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • kavyap
  • thenastyranch
  • ethstaker
  • osvaldo12
  • mdbf
  • DreamBathrooms
  • InstantRegret
  • magazineikmin
  • Youngstown
  • ngwrru68w68
  • slotface
  • GTA5RPClips
  • rosin
  • megavids
  • cubers
  • everett
  • cisconetworking
  • tacticalgear
  • anitta
  • khanakhh
  • normalnudes
  • Durango
  • modclub
  • tester
  • provamag3
  • Leos
  • lostlight
  • All magazines