Security vulnerability: installation of package from insecure source #6
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
While working for Turnkey, I've discovered a suspected vulnerability in the current
toolchain
logic (as ofa2315fdbc8
).In the
packages-fetch
script, the system-wide apt sources configuration is set to install apt sources from archive origins:a2315fdbc8/scripts/packages-update (L41-L47)
a2315fdbc8/scripts/packages-fetch (L11)
The
packages-fetch
script then downloads, without installation, a desired list of packages to collect their.deb
files. For technical reasons, this happens with[trusted=yes]
flag on the package sources, disabling the signature checks on the apt packages. Additionally, these archive servers are configured withhttp://
due to limited availability ofhttps://
archive mirrors, which has no transport layer security such as TLS certificate checks or encryption. Normally, this is acceptable since the fetched file artifacts are checked against cryptographic hashes by thetoolchain
logic before any usage.The security problem arises when installing the
dpkg-dev
package while the system is still configured with the insecure meant-for-archive-fetch apt configuration:a2315fdbc8/scripts/packages-fetch (L40)
I have not tested this experimentally, but expect that a Machine-in-the-Middle (MitM) attacker on the network path, or attacker with similar capabilities to impersonate one of the archive servers, could serve the
toolchain
container a malicious unsigneddpkg-dev
package overhttp://
. This package would then get installed due to the disabled apt signature checks, and could run malicious code with root permissions, compromising the system and undermining the security goals oftoolchain
.@lrvick approved public documentation of this issue.