4 ms·
OpenEmbedded BitBake supports file integrity verification for remote code sources, http://www.yoctoproject.org/docs/2.3/bitbake-user-manual/bitbake-user-manual.
by walterbell 10y ago
OpenEmbedded BitBake supports file integrity verification for remote code sources, http://www.yoctoproject.org/docs/2.3/bitbake-user-manual/bitbake-user-manual.html#the-download-fetch http://www.yoctoproject.org/docs/2.3/bitbake-user-manual/bit...
File integrity is of key importance for reproducing builds. For non-local archive downloads, the fetcher code can verify SHA-256 and MD5 checksums to ensure the archives have been downloaded correctly. You can specify these checksums by using the SRC_URI variable with the appropriate varflags as follows:
SRC_URI[md5sum] = "value"
SRC_URI[sha256sum] = "value"
- heavenlyhash 10y agoI love that tools like BitBake support integrity, but I also feel it's not enough to merely support it. We must incentivize it, if not outright require it. Integrity is a property of the whole ecosystem. Our toolchains are complex, and call other tools, and those call yet more tools. Optional "support" at any layer means even though the user might ask for integrity at one level, their security and integrity may be unverified by another layer of tool. If we want integrity from the whole ecosystem, we must demand it from every part. Integrity should be a mandate, not an option.
- walterbell 10y agoMost (all?) OpenEmbedded production recipes already use this mechanism to specify hashes during builds.
- heavenlyhash 10y agoMost isn't enough. "All?" with a question mark isn't enough. Just like one zero-day is enough to totally compromise a system, one unverified source anywhere in a build dependency tree is a great way to land just one RCE, leaving your system precisely as hosed as if you just got hit with a zero-day. :) I saw another blog about the summit the top link reports on discuss this as well -- from https://garbas.si/2016/reproducible-builds-summit-in-berlin.html https://garbas.si/2016/reproducible-builds-summit-in-berlin.... : > As with zero vulnerability days, there should probably be zero reproducibility days.
- ploxiln 10y agoChecksums of source tarballs is a feature in practically all distributions. I'm familiar specifically with Arch Linux (example PKGBUILD https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/wpa_supplicant https://git.archlinux.org/svntogit/packages.git/tree/trunk/P...), Homebrew (example Formula https://github.com/Homebrew/homebrew-core/blob/master/Formula/gawk.rb https://github.com/Homebrew/homebrew-core/blob/master/Formul...), Slackware (example https://slackbuilds.org/slackbuilds/14.2/development/avr-gcc/avr-gcc.info https://slackbuilds.org/slackbuilds/14.2/development/avr-gcc...)