From BeepingComputer.

  • qaz
    link
    fedilink
    127
    edit-2
    9 months ago

    A new Linux vulnerability known as ‘Looney Tunables’ enables local attackers to gain root privileges by exploiting a buffer overflow weakness in the GNU C Library’s ld.so dynamic loader.

    It’s always memory management

      • GreyBeard
        link
        fedilink
        629 months ago

        It’s certainly why it is being used to build browsers and OSs now. Those are places were memory management problems are a huge problem. It probably doesn’t make sense for every match 3 game to be made in Rust, but when errors cause massive breaches or death, it’s a lot safer than C++, taking human faulability into account.

        • AggressivelyPassive
          link
          fedilink
          219 months ago

          Question would be rather: why is something like C++ needed for such simple apps?

          C++ seems to be in that weird in-between place of offering high level features to be reasonable productive, but still doesn’t enforce/guarantee anything to make these features safe. I’d argue, very few programs need that. Either you’re writing business stuff, then you want safety (Java, C#, rust), or you’re writing embedded/low level stuff, then you want control (C, ASM).

          The room for “productive, but not interested in safety” is basically just AAA games, I guess.

          • @intelati@programming.dev
            link
            fedilink
            109 months ago

            C is almost the old “steady” standard now it feels like. It’s so flexible and the frameworks are already built…

          • @teawrecks@sopuli.xyz
            link
            fedilink
            79 months ago

            Well you’re not going to write asm if you want your code to be portable at all, and believe it or not C++ has a lot of features to help you not shoot yourself in the foot that C doesn’t have (ex. OOP, RAII, smart pointers).

            C wasn’t really designed with dynamic memory management in mind. It was designed for someone who has absolute control over a machine and all the memory in it. malloc() and free() are just functions that some environments expose to user mode processes, but C was never designed to care where you got your memory or what you do with it.

          • @ziviz@lemmy.sdf.org
            link
            fedilink
            English
            79 months ago

            The short answer is Rust was built with safety in mind. The longer answer is C was built mostly to abstract from assembly without much thought to safety. In C, if you want to use an array, you must manually request a chunk of memory, check to make sure you are writing within the bounds of your array, and free up the memory used by your array when completely done using it. If you do not do those steps correctly, you could write to a null pointer, cause a buffer overflow error, a use-after-free error, or memory leak depending on what step was forgotten or done out of order. In Rust, the compiler keeps track of when variables are used through a borrowing system. With this borrowing system the Rust compiler requests and frees memory safely. It also checks array bounds at run-time without a programmer explicitly needing to code it in. Several high-level languages have alot of these safety features too. C# for example, can make sure objects are not freed until they fall out of scope, but it does this at run-time with a garbage collector where Rust borrower rules are done at compile-time.

            • Affine Connection
              link
              fedilink
              English
              1
              edit-2
              9 months ago

              C was built mostly to abstract from assembly

              That’s actually not true; rather, many modern architectures are designed to allow languages like C to be compiled more easily. Old architectures don’t even have a built-in stack.

          • Michael Murphy (S76)
            link
            fedilink
            English
            5
            edit-2
            9 months ago

            The compiler enforces “aliasing XOR mutability”; utilizes “move semantics”; has a “borrowing and ownership” model; and requires the programmer to tag their references with “lifetimes”. Array accesses are checked at runtime if they cannot be guaranteed safe at compile-time. Variables passed by value (moved) cannot be reused. Variables cannot be moved or mutated if any borrow to them exists. You may either have only one mutable borrow, or many immutable borrows, but never both. Therefore you cannot mutate an array while iterating on it, and you cannot have two separate unchecked references to the same array. Every function or type that accepts a borrow must be able to annotate the lifetimes of references to ensure that references are always dropped in the correct order to prevent dangling references. Rust requires developing software with discipline using patterns that satisfy all of these constraints.

    • @Eezyville@sh.itjust.works
      link
      fedilink
      English
      359 months ago

      Didn’t Microsoft do a study on security vulnerabilities and found that the overwhelmingly number of bugs was due to memory management?

  • Veticia
    link
    fedilink
    359 months ago

    I wonder if this could be used to root previously unrootable Android based devices.

    • @loics2@lemm.ee
      link
      fedilink
      609 months ago

      Android doesn’t use glibc, but Bionic, a C standard library developed by Google. So I don’t think this vulnerability affects Android.

      • @Knusper@feddit.de
        link
        fedilink
        99 months ago

        What the heck. I thought, they were using musl.
        Certainly seems like this has rather similar goals to musl…

        • AggressivelyPassive
          link
          fedilink
          179 months ago

          That’s no reason for Google not to reinvent the wheel…

          They did the same with dalvik and ART now. JVMs, but more googlier!

      • @Molecular0079@lemmy.world
        link
        fedilink
        English
        89 months ago

        Thanks! Not just for notifying about the fix but also showing me where package revisions are built from! I just love the transparency of Arch.

        • ferret
          link
          fedilink
          English
          19 months ago

          Arch is a meme, but it is honestly really cool too.

    • palordrolap
      link
      fedilink
      7
      edit-2
      9 months ago

      Makes me wonder. LMDE got a glibc update too and Mint is very much not leading edge when it comes to non-critical updates.

      Case in point, at roughly the same time as the glibc update, we (LMDE users) were upgraded to the latest Thunderbird, 115.3.1, four or five days after that sub-version came out. That’s the sort of lag we generally see. (115.x was a bit of a surprise too as we’ve been on 102.x, but that’s not strictly relevant here.)

    • macallik
      link
      fedilink
      1
      edit-2
      9 months ago

      Ran nala after seeing this post and got a libc update on Debian myself