🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.privacy.anon-server
Article #322806

Deterministic / Reproducible Builds

#322806
From: D
Date: Wed, 04 Oct 2023 01:42
123 lines
8069 bytes
https://reproducible-builds.org/ 
>Reproducible Builds  
>Reproducible builds are a set of software development practices that create an 
>independently-verifiable path from source to binary code. (more) 
>Why does it matter?  
>Whilst anyone may inspect the source code of free and open source software for
>malicious flaws, most software is distributed pre-compiled with no method to   
>confirm whether they correspond. 
>This incentivises attacks on developers who release software, not only via 
>traditional exploitation, but also in the forms of political influence,  
>blackmail or even threats of violence. 
>This is particularly a concern for developers collaborating on privacy or   
>security software: attacking these typically result in compromising 
>particularly politically-sensitive targets such as dissidents, journalists and  
>whistleblowers, as well as anyone wishing to communicate securely under a 
>repressive regime. 
>Whilst individual developers are a natural target, it additionally encourages
>attacks on build infrastructure as a successful attack would provide access to  
>a large number of downstream computer systems. By modifying the generated
>binaries here instead of modifying the upstream source code, illicit changes 
>are essentially invisible to its original authors and users alike. 
>The motivation behind the Reproducible Builds project is therefore to allow 
>verification that no vulnerabilities or backdoors have been introduced during
>this compilation process. By promising identical results are always generated  
>from a given source, this allows multiple third parties to come to a consensus 
>on a "correct" result, highlighting any deviations as suspect and worthy of 
>scrutiny.  
>This ability to notice if a developer or build system has been compromised
>then prevents such threats or attacks occurring in the first place, as any  
>compromise can be quickly detected. As a result, front-liners cannot be 
>threatened/coerced into exploiting or exposing their colleagues.
>Several free software projects already, or will soon, provide reproducible  
>builds. 
>How? 
>First, the build system needs to be made entirely deterministic: transforming
>a given source must always create the same result. For example, the current 
>date and time must not be recorded and output always has to be written in the  
>same order. 
>Second, the set of tools used to perform the build and more generally the 
>build environment should either be recorded or pre-defined. 
>Third, users should be given a way to recreate a close enough build
>environment, perform the build process, and validate that the output matches   
>the original build. 
>Learn more about how to make your software build reproducibly... 
>https://reproducible-builds.org/docs 
[end quote] 
  
https://en.wikipedia.org/wiki/Reproducible_builds 
>Reproducible builds  
>From Wikipedia, the free encyclopedia 
>Logo of the Software Freedom Conservancy's Reproducible Builds project 
>Reproducible builds, also known as deterministic compilation, is a process of  
>compiling software which ensures the resulting binary code can be reproduced. 
>Source code compiled using deterministic compilation will always output the 
>same binary.[1][2][3]  
>Reproducible builds can act as part of a chain of trust;[1] the source code 
>can be signed, and deterministic compilation can prove that the binary was
>compiled from trusted source code. Verified reproducible builds provide a  
>strong countermeasure against attacks where binaries do not match their source
>code, e.g., because an attacker has inserted malicious code into a binary.  
>This is a relevant attack; attackers sometimes attack binaries but not the 
>source code, e.g., because they can only change the distributed binary or to   
>evade detection since it is the source code that developers normally review 
>and modify. In a survey of 17 experts, reproducible builds had a very high
>utility rating from 58.8% participants, but also a high-cost rating from  
>70.6%.[4] Various efforts are being made to modify software development tools
>to reduce these costs.   
>Methods  
>For the compilation process to be deterministic, the input to the compiler 
>must be the same, regardless of the build environment used. This typically
>involves normalizing variables that may change, such as order of input files, 
>timestamps, locales, and paths.   
>Additionally, the compilers must not introduce non-determinism themselves. 
>This sometimes happens when using hash tables with a random hash seed value.   
>It can also happen when using the address of variables because that varies 
>from address space layout randomization (ASLR). 
>Build systems, such as Bazel and Gitian,[5] can be used to automate
>deterministic build processes.  
>History  
>The GNU Project used reproducible builds in the early 1990s. Changelogs from 
>1992 indicate the ongoing effort.[6]  
>One of the older[7] projects to promote reproducible builds is the Bitcoin
>project with Gitian. Later, in 2013, the Tor (anonymity network) project  
>started using Gitian for their reproducible builds.[8] 
>In July 2013 on the Debian project started implementing reproducible builds  
>across its entire package archive.[9][10] 
>By July 2017 more than 90% of the packages in the repository have been proven   
>to build reproducibly.[11]     
>In November 2018, the Reproducible Builds project joined the Software Freedom 
>Conservancy.[12]  
>F-droid uses reproducible builds to provide a guarantee that the distributed 
>APKs use the claimed free source code.[13]  
>The Tails portable operating system uses reproducible builds and explains to 
>others how to verify their distribution.[14]    
>NixOS claims 100% reproducible build in June 2021 for their minimal ISO  
>releases.[15]   
>As of September 2023, Arch Linux is working on making all official packages    
>reproducible.[16] 
>Challenges 
>According to the Reproducible Builds project, timestamps are "the biggest  
>source of reproducibility issues. Many build tools record the current date and 
>time... and most archive formats will happily record modification times on top  
>of their own timestamps."[17] They recommend that "it is better to use a date
>that is relevant to the source code instead of the build: old software can    
>always be built later" if it is reproducible. They identify several ways to 
>modify build processes to do this:   
> * Set the SOURCE_DATE_EPOCH environment variable to the number of seconds 
>   since January 1, 1970, using something from the source code. Tools that  
>   support this environment variable will use its value (when set) instead of 
>   the current date and time.  
> * Post-process output to remove timestamps or normalize them. The tool strip- 
>   nondeterminism can often help do this.   
> * Use a library like libfaketime to intercept requests for the current time
>   of day and provide a controlled response. 
>In some cases other changes must be made to make a build process reproducible. 
>For example, some data structures do not guarantee a stable order in each
>execution. A typical solution is to modify the build process to specify a  
>sorted output from those structures. [18]   
>See also  
> Bootstrapable builds https://en.wikipedia.org/wiki/Bootstrapable_builds 
[end quote]  
   
Technical Details
Message-ID: <9103aa4f6353245ab2d79142673f96b9@dizum.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <9103aa4f6353245ab2d79142673f96b9@dizum.com>
Subject: Deterministic / Reproducible Builds
Date: Wed, 04 Oct 2023 01:42:28 +0000
From: D <J@M>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
Content-Transfer-Encoding: 7bit
Newsgroups: alt.privacy.anon-server
Organization: dizum.com - The Internet Problem Provider
X-Abuse: abuse@dizum.com
Injection-Info: sewer.dizum.com - 2001::1/128