@alilleybrinker@hachyderm.io
@alilleybrinker@hachyderm.io avatar

alilleybrinker

@alilleybrinker@hachyderm.io

Software supply chain security. OmniBOR, Hipcheck, cargo-spdx, langs-in-rust. “Lilley Brinker” is my full last name.

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

davidho, to random
@davidho@mastodon.world avatar

I was at a conference and a speaker dismissed my question by saying that I should check out the work of David Ho. 😵‍💫

alilleybrinker,
@alilleybrinker@hachyderm.io avatar

@davidho "but doctor, I AM David Ho"

cjk, to rust
@cjk@chaos.social avatar

deleted_by_author

  • Loading...
  • alilleybrinker,
    @alilleybrinker@hachyderm.io avatar
    alilleybrinker,
    @alilleybrinker@hachyderm.io avatar

    @cjk what do you mean "move the value from the heap to the stack?" the point of Deref is to support coercions to an "inner" type for API convenience, and its only method takes self by reference, which doesn't move the original type. For Box you don't move the heap value to the stack, you have a reference on the stack which points to the heap.

    alilleybrinker,
    @alilleybrinker@hachyderm.io avatar

    @cjk ah, that's some interesting wording in the docs. This explanation from SkiFire hopefully explains the nuance here more fully: https://www.reddit.com/r/rust/comments/thvc2e/comment/i1abf5l/

    alilleybrinker, to random
    @alilleybrinker@hachyderm.io avatar

    The new "xz" supply chain attack has some common patterns:

    • Split attack commits into "seed" commit and "activation" commit.
    • Compromise trusted user account to make malicious contribution (easier than fooling trusted users as a new contributor, or gaining trust first through non-malicious contributions)
    • Include portion of the attack in the release artifact but not the source repo

    All of these make detection harder.

    alilleybrinker, to random
    @alilleybrinker@hachyderm.io avatar

    Thanks @oxidecomputer for pointing me to Nicholas Carlini’s obfuscated C code contest winning submission that uses printf with %n. It’s enlightening to read! https://www.ioccc.org/2020/carlini/index.html

    alilleybrinker, to rust
    @alilleybrinker@hachyderm.io avatar

    Herb Sutter, chair of the ISO C++ Committee, has a new deep dive on improving safety in C++.

    I’m glad to see the C++ leadership taking this seriously. This is a more level-headed and serious take than those I’ve seen previously.

    https://herbsutter.com/2024/03/11/safety-in-context/

    #rust #rustlang #cpp

    janriemer, to random

    Today I've almost overslept, because my alarm clock didn't go off.

    Wanna know why? Just look at today's date...🤦

    #Bug #Bugs #LeapYear

    alilleybrinker,
    @alilleybrinker@hachyderm.io avatar

    @janriemer The alarm clock is part of the Leap Day Resistance

    alilleybrinker, to random
    @alilleybrinker@hachyderm.io avatar

    All I want is to write software which errors out on leap days saying "ILLEGAL DAY DETECTED. THIS INCIDENT WILL BE REPORTED."

    alilleybrinker,
    @alilleybrinker@hachyderm.io avatar

    Leap days should be snow days and our software should enforce it by not working

    alilleybrinker, to rust
    @alilleybrinker@hachyderm.io avatar

    Kneejerk reactions to the White House announcement on memory safety have been to declare "WHITE HOUSE MADE C ILLEGAL" or something similar.

    I don't think policymakers expect C or C++ can or should be fully eliminated. There are serious risks associated with rewriting existing code.

    Rather, instances of memory unsafe languages will likely have to explain how they mitigate risk with techniques like testing, sandboxing, and formal methods.

    #rust #memorysafety

    alilleybrinker,
    @alilleybrinker@hachyderm.io avatar

    I think @shortridge's "SUX Rule for Safer Code" is a nice explainer of what code is most critical to transition, and it specifically calls out sandboxing as a key part of mitigating the risks associated with memory unsafety: https://kellyshortridge.com/blog/posts/the-sux-rule-for-safer-code/

    #memorysafety

    alilleybrinker, to rust
    @alilleybrinker@hachyderm.io avatar

    This glibc qsort vulnerability is indicative of Rust's different safety culture vs. C.

    The Rustonomicon discusses how unsafe code can never assume safe code behaves correctly. It gives the example of an incorrect Ord implementation and explains how unsafe code MUST be safe even in that case.

    In this C code, qsort allows out-of-bounds read if passed a non-transitive comparison function and a large array to sort, exactly the same case.

    https://www.openwall.com/lists/oss-security/2024/01/30/7

    #rust #rustlang

    alilleybrinker, to rust
    @alilleybrinker@hachyderm.io avatar

    David Benjamin’s article on the differences between C, C++, and Rust representations of slices raises the issue that it’s unsound to just share the pointer/length pair across C or C++ into Rust.

    Good news (I think) is that Rust’s backcompat policy has an exception for soundness fixes. Changing the slice definition for empty slices should, AIUI, actually make more code correct. So hopefully the Rust project is open to it.

    https://davidben.net/2024/01/15/empty-slices.html

    #rust #rustlang

    alilleybrinker, to rust
    @alilleybrinker@hachyderm.io avatar

    I really appreciate Rust having a standard way to write docs (rustdoc) and a standard platform for hosting docs for public packages (docs.rs) when I go to an ecosystem without those things

    kurtseifried, to random

    To put it bluntly: barcodes are a miracle and underappreciated.

    Software package identifiers are much harder, which is probably why everyone complains about every existing solution to some degree because they are all. in fact. not great. Because it's a really hard problem. Find out with @kurtseifried and @joshbressers on the #osspodcast https://opensourcesecurity.io/2024/01/07/episode-410-package-identifiers-are-really-hard/

    TL;DR: CISA did a REALLY Interesting thought experiment about 4 possible outcomes and you should probably read the paper they produced talking about them.

    P.S. I wish I could @cisa

    alilleybrinker,
    @alilleybrinker@hachyderm.io avatar

    @joshbressers @mariuxdeangelo @kurtseifried (hi, OmniBOR WG member here) this is part of the way that the OmniBOR folks have thought about distinguishing OmniBOR from pURL. pURL (mostly, unless you append something like a hash) provides a location but not necessarily an identity. Expectations that the thing at some package location doesn't change are based on platform guarantees but not third-party verifiable. OmniBOR Artifact Identifiers are identities but not locations.

    alilleybrinker, to rust
    @alilleybrinker@hachyderm.io avatar

    pathbuf version 1.0.0 has been released!

    This is a simple crate providing a vec-like macro for constructing PathBufs in Rust!

    https://docs.rs/pathbuf/latest/pathbuf/

    alilleybrinker, to rust
    @alilleybrinker@hachyderm.io avatar

    lol, a group of unnamed “C++ senior members with decades [of] experience in ISO C++” filed a response to the federal RFI on open source software security and it is ridiculous.

    https://www.regulations.gov/comment/ONCD-2023-0002-0020

    #rust #rustlang

    sgued, to rust
    @sgued@pouet.chapril.org avatar

    🦀 #Rust

    What does this do?

    Vote below 👇!

    #Rustlang #RustQuiz

    alilleybrinker,
    @alilleybrinker@hachyderm.io avatar

    @sgued aha, I guessed it wouldn’t compile because of the move of the owned type into the closure struct, but the struct doesn’t contain the String (and thus does implement Copy), probably because the binding to _ means no move occurs. Smart!

    alilleybrinker,
    @alilleybrinker@hachyderm.io avatar

    @sgued I don’t agree! I think it’s a natural extension of the leading underscore for silencing unused warnings, and provides a natural mechanism to silence must_use warnings for functions returning potential errors you don’t care to cancel.

    alilleybrinker, to random
    @alilleybrinker@hachyderm.io avatar

    Today’s cursed compiler term: sequence point. https://twitter.com/__phantomderp/status/1674460956632526865

    alilleybrinker,
    @alilleybrinker@hachyderm.io avatar

    If you click through to the tweet JeanHeyd is replying to, you’ll see @dneary correctly using the term.

    “Sequence points” (now just “sequencing” in the C and C++ standards) are part of how C and C++ resolve a textual program down to a sequence of things that happen in a fixed order.

    In particular, there are language constructions which can permit any number of orderings under some constraints, and you really need to write your programs to be safe/correct under all possible valid orderings.

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