Tag: Rust

  • Rust Momentum Intensifies | Elon Says No WFH

    Rust Momentum Intensifies | Elon Says No WFH

    Welcome to The Long View—where we peruse the news of the week and strip it to the essentials. Let’s work out what really matters.

    This week: People won’t shut up about Rustlang, and Musk mandates Twitter teams return to the office. (more…)

  • Linus Torvalds Signals Support for Memory-Safe Rust Language

    Linus Torvalds Signals Support for Memory-Safe Rust Language

    Linus Torvalds told attendees of the Open Source Summit Europe conference today that he is hopeful the foundational work needed to add support for the Rust programming language will be laid in a forthcoming version 6.1 of the Linux operating system.

    It would take several additional releases of Linux to add full support for Rust, but the ability to more easily build and deploy applications written in Rust will go a long way toward improving the overall state of application security on Linux platforms.

    The Open Source Security Foundation (OpenSSF), an arm of the Linux Foundation, has called for replacing programming languages like Java that are not memory-safe as part of a larger plan to secure open source software supply chains. Rust is a memory-safe language that employs a compiler to track the ownership of values that can be used once and a borrow checker that manages how data is used without relying on traditional garbage collection techniques.

    Earlier this week, the Rust Foundation allied with OpenSSF and JFrog to address other security issues that might arise as applications are developed in Rust.

    It’s not clear just how many developers are adopting Rust, but Torvalds said he personally was looking forward to learning the Rust syntax—using a recently-acquired laptop based on an Arm processor—should the maintainers of Linux approve the effort. However, Torvalds also left open the possibility that adding support for Rust might not be as successful as initially hoped.

    Torvalds also bemoaned the overall state of cybersecurity transparency at the operating system level. Many of the bugs that are encountered at the hardware level cannot be shared with the entire open source community, so any fix to those efforts is not subject to the same level of peer review as the rest of the operating system. The overall situation is improving, but it’s still very painful from a development perspective, he said. Secrecy is counter to the open source ethos, he said.

    As new applications are built using a memory-safe programming language, the overall security posture of an organization will steadily improve. The challenge, of course, is that the number of developers that know how to build applications using those languages is still relatively small. Of course, replacing trillions of lines of code that have already been constructed using a variety of legacy non-memory-safe languages represents a gargantuan task that might never be fully completed—but shifting to a modern programming language is a major step in the right direction when it comes to application security.

    There may even come a day when the way applications are coded is a lot more secure by default than it is today. That may not necessarily resolve every application security issue, but as the programming languages become inherently more secure, the pressure on developers to become cybersecurity experts should ease—assuming, of course, they are willing to learn a new way to write code.

  • Rust Foundation Allies With OpenSSF and JFrog to Secure Code

    Rust Foundation Allies With OpenSSF and JFrog to Secure Code

    The Rust Foundation announced today it is working with the Open Source Security Foundation (OpenSSF) and JFrog to help maintainers secure open source software created using the Rust programming language.

    Rebecca (Bec) Rumbul, executive director at the Rust Foundation, said even though Rust is a memory-safe language, there are still security issues that maintainers need to be able to address. The goal is to provide the resources those maintainers need to better secure their software supply chains.

    As part of that effort, the Rust Foundation is adding a dedicated security team to help maintainers of open source projects built using Rust to better secure their software supply chains. That team is being underwritten by JFrog and the Alpha-Omega Initiative funded by Google and Microsoft which was recently launched by OpenSSF. JFrog last week announced it is joining the Rust Foundation at the Platinum level alongside Amazon Web Services (AWS), Google, Huawei, Meta, Microsoft and Mozilla.

    The first initiative for the security team will be to conduct a security audit and develop threat modeling tools that will provide the foundation for a set of best security practices for maintainers, said Rumbul. The team will also help advocate for those security practices across the Rust landscape, including the Cargo package manager and Crates.io directory projects.

    The OpenSSF has previously called for replacing programming languages like Java that are not memory-safe as part of a larger plan to secure open source software supply chains.

    In general, the Rust Foundation is committed to enabling Rust developers to achieve their scale, security and sustainability goals, said Rumbul. Given the early stages of the Rust programming language, there is no better time to start addressing security issues that application developers can’t ignore, she added.

    In the longer term, The Rust Foundation is also committed to providing developers with Rust security education and is also working to come up with a fair approach to certifying which projects have achieved an appropriate level of cybersecurity maturity, said Rumbul.

    It’s not clear whether developers are abandoning older programming languages in favor of a memory-safe language such as Rust. Rust employs a compiler to track the ownership of values that can be used once and a borrow checker that manages how data is used without having to rely on traditional garbage collection techniques.

    Of course, replacing trillions of lines of code that have already been constructed using a variety of legacy languages is a gargantuan task that might never be fully completed. However, as new applications are built using a memory-safe programming language, the overall security posture of an organization will steadily improve. The challenge, of course, is that the number of developers that know how to build applications using those languages is still relatively small.

    Nevertheless, there may come a day when the way applications are coded is a lot more secure by default than it is today. In the meantime, however, the number of vulnerabilities that exist with application environments is still too numerous to count.

  • Rust in Linux 5.20 | Deepfake Hiring Fraud | IBM WFH ‘New Normal’

    Rust in Linux 5.20 | Deepfake Hiring Fraud | IBM WFH ‘New Normal’

    Welcome to The Long View—where we peruse the news of the week and strip it to the essentials. Let’s work out what really matters.

    This week: Linus says next release will support Rust, FBI warns scammers are getting hired in deepfake interviews, and 80% of IBM staff stay at home. (more…)

  • AWS Outage Outrage | Rusty Linux | ARM Latest

    AWS Outage Outrage | Rusty Linux | ARM Latest

    Welcome to The Long View—where we peruse the news of the week and strip it to the essentials. Let’s work out what really matters.

    This week: Amazon Web Services falls on its face, Linux’s move to Rust takes the next step, and the FTC stabs another fatal wound in the horrible Arm/Nvidia deal.

    AWS us-east-1 Breaks the Internet

    First up this week: Amazon Web Services’ outage on Tuesday sent scads of DevOps teams scrambling. But what was the cause?

    Analysis: DNS DDoS?

    While we still don’t officially know, there is some chatter to speculate on. Could it be that AWS’s DNS infrastructure is vulnerable to DNS reflection attacks?

    Hello. It’s Dave Lee: From angry Adele fans to broken robot vacuums

    It started early on Tuesday morning. Robot vacuums ceased sucking, Wi-Fi cameras stopped watching and eager Tinder daters were left unable to “swipe right.”
    …
    Within Amazon itself … the unthinkable occurred: grounded delivery drivers were unable to load packages and deliver to customers’ doorsteps, just as the peak Christmas season begins to step up. … Drivers at multiple facilities across the country were sent home … some dreading whatever workload may await.
    …
    An outage at Amazon Web Services … had rippled through the online economy, crippling services used by millions of people. … An “impairment of several network devices” in … US-EAST-1 was the “root cause” of the disruption, Amazon said.


    I was wondering what DevOps’ers learned? Enter Max Rozen:

    AWS took approximately an hour to update their status page to indicate anything was happening. … While our infrastructure is hosted across 20 AWS regions, a single point of failure was hosted in us-east-1.
    …
    What we learned: … I learned the saying, “Friends don’t let friends deploy in us-east-1.” As a result, we’ll be moving some things over to us-east-2 to start with. Secondly, we’ll be adding redundancy and the ability to failover to another AWS region.


    Getting inside the business, here are Eugene Kim and Katherine Long, to go over everything:

    Even inside AWS … information on the outage remained sketchy [and] rumors spread among staff. One AWS employee speculated that the outage was caused by an “orchestrated DNS attack,” while another employee downplayed those concerns.
    …
    According to a screenshot of an internal AWS communique … ”firewalls are being overwhelmed.” … A separate internal note said … the network issue “specifically impacted” Amazon’s internal DNS servers.


    Linux Officially Gets Rust Code

    The Rust language has taken the next step toward being part of Linux kernel development. Some “drivers and other non-core kernel programs” written in Rust can now be PR’ed. But there’s still no plan to go further.

    Analysis: Still needs lubrication

    Rust is much better than C for writing memory-safe code, and coding provable implementations. However, bootstrapping the toolchain is still stupidly hard.

    Steven J. Vaughan-Nichols: Linux is getting more Rust in it by the day

    It wasn’t that long ago that the very idea that another language besides C would be used in the Linux kernel would have been laughed at. [But] this has been coming for several years now. … Why? Because it’s much safer than C, especially at handling memory errors.
    …
    The next “patch series [adds] support for Rust as a second language to the Linux kernel.” … While he’s encouraging a slow but steady approach to introducing Rust into Linux, [Linus Torvalds] has also said that using Rust interfaces for drivers and other non-core kernel programs makes sense. [But] no one’s going to rewrite the kernel’s 25 million lines of C in Rust.
    …
    The Rust code proposed for the kernel now relies on the stable Rust compiler rather than the beta compilers. … As Linux kernel and lead Rust on Linux, developer Miguel Ojeda, put it, “By upgrading the compiler, we have been able to take off the list a few unstable features we were using.”


    How is it “safer than C”? ssokolow shares this fascinating insight:

    Rust tries to encourage that through good API design which allows it to be proven at compile time that the invariants will be upheld, thus avoiding the need to choose between safety and performance. My favourite example … is “the typestate pattern” which lets you teach the Rust compiler to prove correct traversal of any state machine.
    …
    A more mundane example would be the iterator APIs: No need for bounds checking if the iterator looks up the length once at the beginning and the APIs prevent you from wandering out of each entry it hands you. … Rust programs tend to run faster than their C and C++ counterparts because the developers feel comfortable introducing and maintaining more aggressive optimizations.


    “And then a miracle occurs,” quips @dave_universetf:

    I’m intrigued [but] I can’t help but feel sorry for the people doing bootstrapping work. C is hard enough to bootstrap, but Rust is a whole new level of pain.
    …
    Rust is literally not source bootstrappable. [The compiler] that works right now is Rust 1.39. So then you have to compile 18 more Rust compilers to get up to the current version.


    Nvidia’s ARM Woes Continue

    As I’ve said before, this deal really shouldn’t go through. Ownership of the ARM ISA and the core designs would be a huge strategic stick to beat Nvidia’s competition with. ARM chips are an increasing fixture in the datacenter—especially those that value “performance per Watt.”

    Analysis: Stick a fork in it

    Nvidia’s attempt to buy Arm from SoftBank is suffering death by a thousand cuts. And the latest wound comes from the FTC’s Higonokami knife.

    Paul Thurrott: FTC Sues to Block Sale of Arm to Nvidia

    The U.S. Federal Trade Commission … sued to block Nvidia’s $40 billion acquisition of … Arm, citing competitive concerns. … Nvidia announced its intention to purchase Arm from Softbank for about $40 billion, over one year ago, in September 2020. But the deal fell under immediate criticism from the major industry players that rely on Arm’s … designs, and the UK government announced … it would “intervene” for national security reasons.
    …
    Now, it may not happen at all. “We will continue to work to demonstrate that this transaction will benefit the industry and promote competition,” Nvidia said.


    Explain like I’m 5? Here’s swillden:

    ARM has a non-trivial and increasing share in the data center. … ARM is much, much bigger than phones … Arm is an important competitor to Intel and AMD. … Arm licensing IP to Qualcom, nVidia, Mediatek, Unisoc, Samsung, Apple, Google, etc., has been great for many areas of technology.
    …
    Arm acting as a common … designer for a bunch of different chip vendors has been extremely good for … progress in CPU/SoC design. … It would be really unfortunate if a lot of the industry were to shift back to x86, eliminating all of the competition on hardware features that we get from the many ARM chipmakers.


    But what of SoftBank? Ian King runs the numbers:

    Wall Street analysts are all but calling the deal dead. … According to Citibank analysts, the chances of the Nvidia purchase closing are now just 5%.
    …
    The company faces the prospect of losing a jackpot of roughly $74 billion. … Other suitors are unlikely to match such an offer. … So SoftBank’s best alternative may well be an initial public offering for the Arm business—but that is likely to value the company at … $19.8 billion—only about 27% the value of the … Nvidia deal.


    The Moral of the Story: It’s no secret that the both of us are running out of time


    You have been reading The Long View by Richi Jennings. You can contact him at @RiCHi or tlv@richi.uk. (It’s so typical of me to talk about myself—I’m sorry.)

    Image: Ləman Şirinzadə (via Unsplash)

  • Using Rust to Build Distributed Applications

    Using Rust to Build Distributed Applications

    Rust is an open source programming language that was initially developed at Mozilla Research and became increasingly popular for building distributed applications. It has been referred to in the Stack Overflow Survey as “the most-loved programming language” by software developers for five consecutive years. Moreover, companies like Amazon and Microsoft have recently revealed that they are using Rust to develop the software components that are responsible for ensuring application safety.

    Rust allows the implementation of safe and predictable code by leveraging memory safety and speed. It is the ideal choice to create code without incurring undefined or unpredictable behavior thanks to its features such as consistent runtime behavior and a static type system.

    Although Rust can be used for any system programming application, it is mainly implemented to build applications like simulation and game engines, browser components and file and operating systems. Rust syntax is similar to C++, but it addresses issues that C and C++ normally struggle with such as developing code without security vulnerabilities, general memory errors and problems in writing concurrent programs.

    The Advantages of Rust in Distributed Programming

    Rust tackles the performance and reliability problems of other low-level programming languages by using a careful compiler which examines all the variables used and referenced. As the code is compiled, Rust uses monomorphization by creating exclusive and high-performance code for each type of channel. It prevents programmers from paying performance penalties due to its flexibility. Based on the principle that you don’t pay for what you don’t use, the code written in Rust is enhanced and abstractions are solved at compile time making the program safe and without runtime overhead.

    Rust doesn’t have a garbage collector, which allows programmers to build abstractions with predictable performance. In Rust, there is no garbage to collect because the moment something would have become garbage, it gets freed immediately at compile time, making the program much faster. Moreover, Rust uses a borrow checker to check where data is used across the program, and by following a set of rules it establishes where data needs to be dropped or initialized. It provides the same advantages of a garbage collector with the efficiency and predictability of manual management.

    Another crucial characteristic of Rust is its asynchronous I/O. In Rust, asynchronous programming is widely implemented and well-integrated. It enables developers to effectively scale on a certain number of cores and exploit the operating system resources. By running several units of code on each application, this feature enhances performance and responsiveness of the operating system.

    Rust prevents some of the software engineering problems that could critically damage the application development process. These issues concern concurrency and memory safety which can cause very often denial of service, code vulnerabilities or compromised secrets. Examples of these frictions that are common in other languages such as C or C++ include uninitialized variables, undefined behavior, invalid iterators and unexpected variable modification.

    Another great advantage of using Rust is the Rust developer community, an extremely friendly and welcoming community. There are multiple events, chat rooms and forums to participate in that makes it even more pleasant to build distributed applications with Rust.

    Thanks to its ability to fix concurrency and memory issues, to compile and run safe and predictable code and provide a fast implementation, Rust is quickly increasing its popularity and establishing itself as the ideal choice for building distributed applications.

  • How the Nuts and Bolts of the Internet Are Evolving to Change the Way You Code

    How the Nuts and Bolts of the Internet Are Evolving to Change the Way You Code

    2019 was a big year for internet infrastructure, programming languages and platform development. In the last 12 months, we saw things like new connectivity in the sky and the sea and greater security of those connections with the growth of TLS 1.3 and certificate transparency. But three trends in particular stood out as having some of the biggest impacts on developers as we head into 2020. 

    Rust Capabilities Boost Its Popularity

    Rust continued to grow in popularity as it was voted Stack Overflow’s most beloved language for the fourth year in a row, due in large part to its unmatched ability to free developers from the choice between safety and performance in a programming language. Before Rust, developers had to decide between languages like C, which is fast, but has a high likelihood of security failures, or Haskell, which comes with more safety, but is noticeably less performant. Rust provides a level of safety guarantees developers haven’t been able to enjoy before, while still delivering on low-level, native performance. The learning curve is fairly steep, but the batteries-included features you’d expect from a modern language check the boxes developers need to deliver on priorities next year. 

    HTTP/2 Paves the Way for HTTP/3, Allowing Developers to Build Even More Performant Sites Without All the Hassle

    Protocols that deliver and secure richer content saw progress in 2019, too, with HTTP/2 becoming the most common web protocol and a glimpse of the even greater benefits of HTTP/3 to come in 2020. HTTP/2 made developers’ lives easier by simplifying the hacks and workarounds they had to do to get performant sites working with HTTP/1.1 by addressing the complexity of lots of tiny objects within a page. By reducing page load times and improving responsiveness, HTTP/2 has paved a solid foundation for HTTP/3, which has the potential to become widely deployed in early 2020 as the new transport protocol, QUIC, nears completion. QUIC, a replacement for TCP, addresses the head-of-line blocking delays HTTP/2 exhibits for some p90 scenarios. Additionally, QUIC incorporates TLS 1.3, ensuring an easy upgrade to the most recent version of the internet’s standard security functionality.

    WebAssembly Promises New Possibilities

    Most excitingly, love for and support of WebAssembly (Wasm) by developers picked up steam in 2019 due to the recognition it has received for its secure, performant, cross-platform and cross-device runtime. A glimpse into Wasm’s future promises greater portability, as it allows developers to take the code they have written and run it on entirely different platforms, at scale. Wasm is a sea-change for the entire industry as programs will be able to work not just on different browsers—as we saw with the Google Earth launch on Wasm—but beyond the browser, across various devices and platforms. Think watches, TVs, cars and security systems that can be more securely connected—not to mention the functions-as-a-service speeding up the world on the edge. With the backing of the Bytecode Alliance, a newly formed collaboration between Mozilla, Fastly, Red Hat and Intel, Wasm becomes a prime foundation for more secure and portable software development in 2020.

    With all the changes in 2019, 2020 stands to be another exciting year for developers, bringing even greater flexibility to their roles and career opportunities. Ongoing internet infrastructure improvements continue to empower our developer community and enable more secure and efficient programming and computing—all while improving the end-user experience.

    — Tyler McMullen

  • DevSecOps: Fortanix Adds Open Source Rust SDK to Build Encrypted Apps

    DevSecOps: Fortanix Adds Open Source Rust SDK to Build Encrypted Apps

    There’s a lot of focus these days on DevSecOps as part of an effort to fix what’s generally acknowledged as a broken cybersecurity paradigm. But instead of trying to ensure every potential vulnerability is addressed before an application is deployed, another idea is gaining momentum among the DevOps community: Build applications that are secure in the first place, using modern programming languages.

    Fortanix, at RSA Conference 2019, launched an Enclave Development Platform (EDP) based on an open source software development kit (SDK) written in Rust. The SDK is optimized for Intel Software Guard Extensions (SGX), which are extensions to Intel instruction sets that define private regions of memory, dubbed enclaves, that prevent data to either be read or saved by any process outside the enclave. Intel SGX is required to be on by default in the latest generations of Intel processors.

    Company CEO Ambuj Kumar said Fortanix has been advocating the adoption of a runtime platform that makes it possible to process encrypted data in memory without ever having to expose it as plain text. By partnering with Intel to create a Rust-based SDK, the company wants to make it easier for developers to take advantage of an inherently secure programming language to invoke the Fortanix runtime.

    Fortanix, which also provides access to a self-service key management service for managing encryption, recently received an additional $23 million in funding led by Intel Capital.

    Kumar said Rust is gaining in popularity as a programming language because it is designed to include guardrails that prevent cybercriminals from injection attacks by corrupting code running in memory. In fact, Kumar noted that one of the reasons why cybersecurity professionals are now against deploying applications written in C or C# is because there are no such guardrails available.

    The combination of Rust and Intel SGX doesn’t eliminate the need for organizations to define a set of best DevSecOps processes. But it does take a significant amount of pressure off developers who choose to build applications using a modern programming language to create applications that are not as easily hacked.

    Naturally, it will take some time for developers to give up tools based on legacy programming languages that many of them have been using for years. But Kumar said Rust adoption is already spreading like wildfire because developers are looking for a way to eliminate cybersecurity issues that many are now being held accountable to resolve once they are discovered in a production environment.

    Of course, billions of lines of legacy application code are not going to disappear overnight simply because a new programming language has come into vogue. But enhancing cybersecurity may very well become a compelling reason to rewrite some of those most mission-critical legacy applications, especially if they wind up improving the performance. After all, those legacy applications are targeted because that’s where the organization’s most valuable data resides. Of course, Intel is betting it won’t make sense to deploy those rewritten applications on processors that don’t support SGX. But whatever the rationale, the amount of time developers have to devote to ongoing cybersecurity issues is clearly limited.

    — Mike Vizard