• 3 Posts
  • 27 Comments
Joined 3 years ago
cake
Cake day: June 11th, 2023

help-circle



  • I would expect it to apply to everything. You don’t want to hit the issues in the first place.

    It seems like a weighing of (safe) CPU support vs better generated instructions. If you don’t care about a CPU generation, maybe because it’s old enough, or your target environment is restricted/controlled, you don’t enable it. If it’s still out there and you want to or have to support it, you enable it.

    I would imagine a “CPU-Workaround-<Manufacturer>-<Generation>” or something, and if you enable it, it completely evades the instruction constellations that cause the issues and uses alternatives instead.

    Maybe it could have “evade completely” (same code runs on every CPU) and “generate cpu-checked workaround code branches” (faulty CPUs execute a different branch) as alternatives.




  • I don’t see anything as having to come before learning Rust.

    If something about Rust requires more technical knowledge, then that learning is part of learning Rust, even if you could have learned it separately beforehand.

    Better start learning Rust to get in there instead of delaying, which adds risk to never arriving, loss of interest, or lack of progress on the goal of learning Rust, with a lack of satisfaction.

    Once you learned Rust, you can look around to gain broader knowledge and expertise, if you want, but that’s not necessary to learn and make use of Rust.






  • What is the vulnerability, what is the attack vector, and how does it work? The technical context from the linked source Edera

    This vulnerability is a desynchronization flaw that allows an attacker to “smuggle” additional archive entries into TAR extractions. It occurs when processing nested TAR files that exhibit a specific mismatch between their PAX extended headers and ustar headers.

    The flaw stems from the parser’s inconsistent logic when determining file data boundaries:

    1. A file entry has both PAX and ustar headers.
    2. The PAX header correctly specifies the actual file size (size=X, e.g., 1MB).
    3. The ustar header incorrectly specifies zero size (size=0).
    4. The vulnerable tokio-tar parser incorrectly advances the stream position based on the ustar size (0 bytes) instead of the PAX size (X bytes).

    By advancing 0 bytes, the parser fails to skip over the actual file data (which is a nested TAR archive) and immediately encounters the next valid TAR header located at the start of the nested archive. It then incorrectly interprets the inner archive’s headers as legitimate entries belonging to the outer archive.

    This leads to:

    • File overwriting attacks within extraction directories.
    • Supply chain attacks via build system and package manager exploitation.
    • Bill-of-materials (BOM) bypass for security scanning.





  • I changed the cargo home/cache directory so it’s easier to clean up. The disk space pollution of Rust is insane.

    I did a small project project that resulted in an 8 MB executable. And had dozens of gigabytes to clean up.

    Even more confusing was how closing VS Code lead to 11 GBs being freed. I initially had three or four projects open for reference in APIs and API usage. But my primary partition ran full quickly. In the end I used Rover and minimized IDE usage to two instances. And after my work, removed target and cargo build data again so I actually have space to work with on my primary partition.