Slashdot Mirror


Matthew Garrett Has a Fix To Prevent Bricked UEFI Linux Laptops

hypnosec writes "UEFI guru Matthew Garrett, who cleared the Linux kernel in Samsung laptop bricking issues, has come to rescue beleaguered users by offering a survival guide enabling them to avoid similar issues. According to Garrett, storage space constraints in UEFI storage variables is the reason Samsung laptops end up bricking themselves. Garrett said that if the storage space utilized by the UEFI firmware is more than 50 percent full, the laptop will refuse to start and ends up being bricked. To prevent this from happening, he has provided a Kernel patch."

25 of 74 comments (clear)

  1. more than 50 per cent full = fail is bad by Joe_Dragon · · Score: 5, Insightful

    more than 50 per cent full = fail is bad and Samsung needs to come out with a bios update to fix that.

    1. Re:more than 50 per cent full = fail is bad by SuricouRaven · · Score: 3, Interesting

      Something like this should never have gotten through testing. Samsung must have tested using only a single OS or a closely related family (ie, Windows) - and that is no way to test if a piece of code is going to behave under all circumstances.

    2. Re:more than 50 per cent full = fail is bad by broken_chaos · · Score: 4, Insightful

      They didn't even test the UEFI nvram (not a partition) filling up. If they had, they would have seen that, oh, wow, it bricks the laptop entirely.

    3. Re:more than 50 per cent full = fail is bad by Goaway · · Score: 3, Funny

      Remember, if Apple hasn't done anything wrong, you can take something somebody else did, and pretend they did it even worse! That's how evil Apple is!

    4. Re:more than 50 per cent full = fail is bad by Goaway · · Score: 2

      I can't help but notice a complete and utter lack of anything resembling facts in your post.

    5. Re:more than 50 per cent full = fail is bad by ais523 · · Score: 4, Informative

      The same bug can brick Samsung laptops on Windows too. It's just that it was noticed on Linux first.

      --
      (1)DOCOMEFROM!2~.2'~#1WHILE:1<-"'?.1$.2'~'"':1/.1$.2'~#0"$#65535'"$"'"'&.1$.2'~'#0$#65535'"$#0'~#32767$#1"
    6. Re:more than 50 per cent full = fail is bad by Impy+the+Impiuos+Imp · · Score: 2

      We've put error logging in our products, and had an upper limit on how much data it could write, then started a circular buffer, then beat the hell out of it to make sure it ran fine.

      So, too, for basically any data storage. This was just sloppy on somebody's part.

      --
      (-1: Post disagrees with my already-settled worldview) is not a valid mod option.
    7. Re:more than 50 per cent full = fail is bad by fuzzyfuzzyfungus · · Score: 4, Insightful

      It was probably very well intentioned - to avoid the UEFI partition becoming full and causing errors.

      Are you not seeing the insanity of avoiding errors caused by being 100% full by bricking the device at 50% full?

      More broadly, for what possible reason would Samsung handle UEFI storage in such a fucked-up way? How many decades now have we had computers with some sort of mass-storage device that had to be treated sanely?

    8. Re:more than 50 per cent full = fail is bad by davester666 · · Score: 2

      You obviously aren't working on a product that is sold with no margin.

      --
      Sleep your way to a whiter smile...date a dentist!
    9. Re:more than 50 per cent full = fail is bad by ZiggyM · · Score: 2

      There is probably a good reason for not allowing more than 50% full. For example assuming the firmware never gets larger than 50%, you have the other 50% as guaranteed space to write the new firmware version. Simply patching firmware is dangerous because of a power failure leaving you in the middle of the patch. Instead, you write the entire new version on the other 50% and then jump to the new firmware without possibility of partial writes. Of course, the bricking part is not the best way to handle it.

  2. That's great, but can they be fixed once bricked? by John+Hasler · · Score: 2

    n/t

    --
    Warning: this article may contain humor, sarcasm, parody, and perhaps even irony. Read at your own risk.
  3. Re:problem fixed? by cheater512 · · Score: 3, Informative

    No the bricked laptops are still bricked. This just stops more laptops from falling to the same bug.

  4. Re:Bad Unified Extensible Firmware Interface...or? by Sir_Sri · · Score: 4, Interesting

    ---The UEF Interface seems to work just fine with Win OS and iOS. How is that a bios problem?

    Samsungs implementation of UEFI is the problem, not the UEFI specification. No, it's not a 'bios' problem, UEFI replaced bios, but Samsung seems to have done something odd in their implementation of UEFI.

    "---Gee wonder why the great mass migration to Linux hasn't happened?

    Well sure, that has always been an issue. Linux apparently isn't important enough for companies to bother testing for it, which means it only works with contrived hacks, which means no one uses it, which means companies don't think it's important enough to bother testing for it.

  5. If it's bricked... by Anonymous Coward · · Score: 2, Interesting

    Just sue on the small claims court.

    You pay like 35 pounds to issue the legal challenge, and you almost automatically win because the problem is due to a defective product.

    Samsung on the other hand will have to show as represented by some lawyer, and has to pay everything.

    If it doesn't show, they will get a decision by default, which is almost the same...

    Why do you think companies do replace items like that instead of flatly refusing?

    Because they can't afford the bad publicity and the continuously court auditions.

    Besides, don't even try to do a class action... is way more fun to have the company to run amok between 1000 court rooms almost at the same time...

    BTW i'm not a lawyer and this is not legal advise. :)

  6. No...Bad Unified Extensible Firmware Interface by tuppe666 · · Score: 4, Informative

    The UEF Interface seems to work just fine with Win OS and iOS. How is that a bios problem?

    http://www.pcworld.com/article/2027819/not-just-linux-windows-can-brick-samsung-laptops-too.html No bad on Windows too.

    Please don't quote other peoples comments as fact, I suggest you check out the reply to it.

    As for the Mass Migration to Linux, that happened with Android, which is set to become the most installed OS this year.

  7. Re:When you go Linux.... by Cito · · Score: 4, Informative

    You can sometimes on many "bricked" devices like linksys router bricks after borking a dd-wrt install
    and on the samsung laptops as well by playing with the jtag

    http://en.wikipedia.org/wiki/Joint_Test_Action_Group

    most stuff has jtag support and in some cases you can use the jtag header to unbrick a device.

    I've unbricked an old WRT54GL after a screwup I did on an older dd-wrt install few years ago using jtag.

    it's not something a normal user would be able to do or have confidence in doing, so yea in most cases the normal user will never unbrick.

  8. Re:Bad Unified Extensible Firmware Interface...or? by fluffy99 · · Score: 4, Informative

    It's been demonstrated that this bug can be elicited from Windows as well. And Windows expects to be able to write even more info than Linux was. Linux was just the first to expose the problem by trying to use UEFI variables to hold kernel panic info (Apple does something similar). IT didn't help that the UEFI driver itself caused the kernel panic, after which the kernel writes some debug log info to the UEFI to support later postmortem analysis.

  9. KISS by gmuslera · · Score: 2

    The fix is in the wrong place. Is basically broken hardware, something that run as root/admin (intended or not) could brick them at any time. Is a problem just waiting to happen, avoiding them is the right solution.

    1. Re:KISS by sjames · · Score: 2

      It's more accurately a work-around. It's certainly in the wrong place and ultimately not "the right thing", but has the advantage that it doesn't depend on a potentially unwilling or unable party to at least get it to not brick. As such, it may be 'the best we can do without Samsung' and as such, it's useful.

      It also adds a bit of shame factor. See that Samsung? Some guy sitting in his office can make your hardware work better (with Linux) than your own engineers. How sad is that?!

      If that doesn't make someone at Samsung beet red in the face and desperate to release a properly corrective patch, they deserve to lose in the market.

  10. It depends on the cpu and the manufacturing.... by Anonymous Coward · · Score: 3, Interesting

    procedure. Some ARM chips have bootstrap code that will talk to a usb device (i.e. looks like a serial port, sort of), and there is a program that lets you load the initial software no matter what's in flash. That usb port might just be a header or a bunch of pads on the cpu.

    With other devices you have to go into a jtag port, (i.e. a header or perhaps just solder pads) load a tiny program into ram, and use THAT to program the flash.

    If they build them with empty flash, there has to be a way to do the initial load. If they build them with programmed flash, it might not be possible without unsoldering the flash chip(s) or something like that.

  11. Re:That's great, but can they be fixed once bricke by LordLucless · · Score: 2, Insightful

    If they can, they weren't bricked in the first place. That's what "bricked" means.

    --
    Just because you're paranoid doesn't mean there isn't an invisible demon about to eat your face
  12. English for Slashdot editors by wonkey_monkey · · Score: 3, Funny

    According to Garrett, storage space constraints in UEFI storage variables is the reason Samsung laptops end up bricking themselves.

    Is? Is?

    --
    systemd is Roko's Basilisk.
  13. Re:When you go Linux.... by Hal_Porter · · Score: 2

    The name is a contrast to the Divided Test Action Group, which collapsed because of internecine squabbling that led to layoffs, punch ups in the parking lot and eventually drive by shootings.

    Brian Damage, their former CTO, is currently serving fourteen life sentences in a SuperMax prison for a flame thrower revenge attack on the Floor 6.

    --
    echo -e 'global _start\n _start:\n mov eax, 2\n int 80h\n jmp _start' > a.asm; nasm a.asm -f elf; ld a.o -o a;
  14. Life imitates art by Kiwikwi · · Score: 2

    Are you not seeing the insanity of avoiding errors caused by being 100% full by bricking the device at 50% full?

    Reactor explosion timer destroyed. Reactor Explosion Uncertainty Emergency Preemption Protocol activated. This facility will self-destruct in two minutes.

  15. Re:Bad Unified Extensible Firmware Interface...or? by ArsenneLupin · · Score: 2

    No, the problem is that on the approach to the bridge is a sign "height limitation 3m", but actually the bridge has only 1.5m clearance. Cars still pass, but even the tiniest lorry will bump into it.