Replies: 8 comments 21 replies
-
Additional suggestion for the project:
Note that the configure script can be generated with: autoreconf [-i] # execute at least once before autoconf
autoconf Deleting the configure script would also make maintenance and reviews of Though note that if the configure script is removed from the repository, then A configure script could still be provided in a tarball to keep it working Maybe the configure script and tarball could be generated in CI for the release |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Very hot, interesting and complicated topic. Not that I have strong opinions yet on what build tooling to favor at this moment in time. It might take a while for the dust of the xz-utils backdoor debacle to settle. In this context I stumbled upon the de-autoconfiscation HOWTO from autodafe - not to be mistaken with a fuzzer framework bearing the same name. Might help informed decision-taking on such a vital subject. |
Beta Was this translation helpful? Give feedback.
-
@kmk3 prepare() {
cd "${srcdir}/${pkgname}"
NOCONFIGURE=1 autoreconf -vfi
} Maybe we should try to contact package maintainers and invite them to share their input on this? |
Beta Was this translation helpful? Give feedback.
-
For signing, the release tags could be improved by creating them as signed tags But even without any signing, if an archive is provided by GitHub directly Distributions could (and some probably do) also use the same file hashes for If there are multiple hosting providers involved and they all use
I'll reply to this separately. Offtopic: Could you write "autotools", "autoconf" or something else directly Adding non-formatting asterisks in the middle of the text messes with markdown
Ideally running the tests would not depend on having a system-wide Interesting, running the compiled binary directly now seems to work. The last
Indeed, maybe using qemu to run a minimal image and then install/run the tests. But even without it, the tests could probably be split into ones that are safe
Yes, tests should still be executed when packaging for distribution, but What I meant by "Do not run tests by default" is that instead of a normal build If we assume that tests face less thorough review (at least outside of the That is, for users just building from the AUR (for example), tests would not be And when packaging for distribution, run the normal build without the tests and This could both be done by the projects themselves (such as by
Even if the source code itself is read-only, malicious code in the tests could Maybe there is a simple way to make the build tree read-only between the build
There are a few committed binary files: $ git ls-files --eol | grep '^i/-text'
i/-text w/-text attr/-text etc-fixes/seccomp-join-bug/eecf35c-backports.zip
i/-text w/-text attr/-text test/appimage/hello-x86_64.AppImage
i/-text w/-text attr/text=auto eol=lf test/filters/memwrexe-32
i/-text w/-text attr/text=auto eol=lf test/filters/namespaces
i/-text w/-text attr/text=auto eol=lf test/filters/namespaces-32
i/-text w/-text attr/text=auto eol=lf test/seccomp-extra/memwrexe I'm not sure if the zip and etc-fixes are still used; maybe they can be The filters could probably be generated at build-time. Creating AppImages requires specialized tooling which is generally not packaged Though maybe they could be generated in CI to at least increase
Yes, but other than generated files, it would likely require more effort to to |
Beta Was this translation helpful? Give feedback.
-
Could you clarify what exactly are your concerns security-wise with the build |
Beta Was this translation helpful? Give feedback.
-
Sources:
|
Beta Was this translation helpful? Give feedback.
-
Adding one more interesting resource. To be clear, I'm not against going for Thanks to both @kmk3 and @topimiettinen for taking the time and efforts to look into this important topic. Quite promising for Firejail's future to see such level of dedication, expertise and consideration. Here's the reference and its accompanying discussion on HN: |
Beta Was this translation helpful? Give feedback.
-
Background
It has recently been reported that the upstream xz project contained malicious
code targeting sshd in its official source code tarballs (versions 5.6.0 and
5.6.1), affecting distribution packages created from them.
It was able to target the sshd service directly because on certain
systemd-based distributions openssh was patched to link libsystemd, which in
turn linked liblzma (provided by xz). This allowed it to directly override
certain functions in the sshd process through the use of GNU indirect functions
(ifuncs).
Most of the malicious code was hidden inside a corrupted xz archive that was
added to the tests in the git repository and a small portion was added to the
configure script (to uncorrupt the archive and run the code within), but only
in the distributed source code tarballs (not in the git repository).
On certain distributions the package has been reverted to an earlier version
and further analysis may still be ongoing.
There is also prior criticism about the safety of the xz file format itself and
of its suitability as a long-term archival format.
Sources:
Issues
Each of the following items is linked to something that makes it less likely to
be reviewed (compared to common parts of the code in the repository):
may contain changes not present in the git repository (and despite that, the
files present in both would usually be assumed to be equivalent)
files and checks for obscure corner cases (which are harder to tell the
legitimacy of and how relevant they still are)
Suggestions
Note: These are not necessarily new; some of them were already done or
suggested elsewhere.
Considering the above, if I had to come up with suggestions to mitigate the
issues they would be the following:
For distributions:
core system programs and libraries
For packagers/users:
host, such as GitHub) at a specific tag/commit as the primary package source
instead of a user-uploaded tarball
checkout (such as in a separate job in CI)
For the project:
.tar.xz archives)
Beta Was this translation helpful? Give feedback.
All reactions