summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-08-20Release 1.6.41.6.4Julian Andres Klode
2018-08-20Revert "Release 1.6.3ubuntu0.1"Julian Andres Klode
This reverts commit ed94a024e14e0fdbd9ea6cabd07063da441bcc02.
2018-08-20Release 1.6.3ubuntu0.11.6.3ubuntu0.1Julian Andres Klode
2018-08-20clear alternative URIs for mirror:// between steps (CVE-2018-0501)David Kalnischkies
APT in 1.6 saw me rewriting the mirror:// transport method, which works comparable to the decommissioned httpredir.d.o "just" that apt requests a mirror list and performs all the redirections internally with all the bells like parallel download and automatic fallback (more details in the apt-transport-mirror manpage included in the 1.6 release). The automatic fallback is the problem here: The intend is that if a file fails to be downloaded (e.g. because the mirror is offline, broken, out-of-sync, …) instead of erroring out the next mirror in the list is contacted for a retry of the download. Internally the acquire process of an InRelease file (works with the Release/Release.gpg pair, too) happens in steps: 1) download file and 2) verify file, both handled as URL requests passed around. Due to an oversight the fallbacks for the first step are still active for the second step, so that the successful download from another mirror stands in for the failed verification… *facepalm* Note that the attacker can not judge by the request arriving for the InRelease file if the user is using the mirror method or not. If entire traffic is observed Eve might be able to observe the request for a mirror list, but that might or might not be telling if following requests for InRelease files will be based on that list or for another sources.list entry not using mirror (Users have also the option to have the mirror list locally (via e.g. mirror+file://) instead of on a remote host). If the user isn't using mirror:// for this InRelease file apt will fail very visibly as intended. (The mirror list needs to include at least two mirrors and to work reliably the attacker needs to be able to MITM all mirrors in the list. For remotely accessed mirror lists this is no limitation as the attacker is in full control of the file in that case) Fixed by clearing the alternatives after a step completes (and moving a pimpl class further to the top to make that valid compilable code). mirror:// is at the moment the only method using this code infrastructure (for all others this set is already empty) and the only method-independent user so far is the download of deb files, but those are downloaded and verified in a single step; so there shouldn't be much opportunity for regression here even through a central code area is changed. Upgrade instructions: Given all apt-based frontends are affected, even additional restrictions like signed-by are bypassed and the attack in progress is hardly visible in the progress reporting of an update operation (the InRelease file is marked "Ign", but no fallback to "Release/Release.gpg" is happening) and leaves no trace (expect files downloaded from the attackers repository of course) the best course of action might be to change the sources.list to not use the mirror family of transports ({tor+,…}mirror{,+{http{,s},file,…}}) until a fixed version of the src:apt packages are installed. Regression-Of: 355e1aceac1dd05c4c7daf3420b09bd860fd169d, 57fa854e4cdb060e87ca265abd5a83364f9fa681 LP: #1787752
2018-07-09Release 1.6.31.6.3Julian Andres Klode
2018-07-09Handle JSON hooks that just close the file/exit and fix some other errorsJulian Andres Klode
JSON hooks might disappear and the common idiom to work around hooks disappearing is to check for the hook in the shell snippet that is in the apt.conf file and if it does not exist, do nothing. This caused APT to fail however, expecting it to acknowledge the handshake. Ignoring ECONNRESET on handshakes solves the problem. The error case, and the other error cases also did not stop execution of the hook, causing more errors to pile up. Fix this by directly going to the closing part of the code. LP: #1776218 (cherry picked from commit 1d53cffad22c92645090e0e6ddde31fe4f7c3b05)
2018-06-25Release 1.6.21.6.2Julian Andres Klode
2018-06-25gitlab-ci: chmod 755 /rootJulian Andres Klode
This should avoid test failures on ubuntu:bionic (cherry picked from commit 3a37521aec0b02e12deaef58772ae0bca9a75496)
2018-06-25gitlab-ci.yml: Also pull in ninja-build for 1.6.yJulian Andres Klode
We don't use ninja to build the package in 1.6.y, so we need to pull it in manually.
2018-06-25CI: Export DEBIAN_FRONTEND=noninteractive in all CI environmentsJulian Andres Klode
This ensures that we don't hang waiting for debconf. (cherry picked from commit 551ded4b63f6f47f022c5ca841031fc2566a58ff)
2018-06-25Fix lock counting in debSystemJulian Andres Klode
debSystem uses a reference counted lock, so you can acquire it multiple times in your applications, possibly nested. Nesting locks causes a fd leak, though, as we only increment the lock count when we already have locked twice, rather than once, and hence when we call lock the second time, instead of increasing the lock count, we open another lock fd. This fixes the code to check if we have locked at all (> 0). There is no practical problem here aside from the fd leak, as closing the new fd releases the lock on the old one due to the weird semantics of fcntl locks. (cherry picked from commit 79f012bd09ae99d4c9d63dc0ac960376b5338b32)
2018-06-25apt-key: Pass all instead of gpg-agent to gpgconf --killJulian Andres Klode
We want to kill everything using our temporary directory. LP: #1773992 (cherry picked from commit 819426013c6ca6310bb469440702b6295dba4498)
2018-06-25gitlab-ci: Run on ubuntu:bionic for 1.6.yJulian Andres Klode
Gbp-Dch: ignore
2018-06-25Lower default timeout from 120s to 30sJulian Andres Klode
120s is an insanely high default time out, lower it to 30s to make things a bit nicer. (cherry picked from commit 329a4a6159f1972ff5ec7bc2db26430f26dc61f3)
2018-06-25Handle a missed case of timed out ip addressesJulian Andres Klode
Correctly register timed out IP addresses from a timed out select() call as a bad address so we do not try it again. LP: #1766542 (cherry picked from commit 71b65b3563d223f6cd69261918ec06d10da48e6c)
2018-06-25Fix hidden test failure if not called via sudoDavid Kalnischkies
id: '': no such user ./test-bug-611729-mark-as-manual: 59: [: Illegal number: Regression-of: 68842e1741a5005b1e3f0a07deffd737c65e3294 Gbp-Dch: Ignore (cherry picked from commit ea901a491bcfe406267c7c38c227c5caabf017a0)
2018-06-25Run tests on GitLab CIJulian Andres Klode
Salsa has support for GitLab CI. This introduces a test setup for it, derived from the ones for shippable and travis. It is not optimal yet: The build is run in the test stage. Fixing this requires us to separate test from build dependencies, and storing build/ as an artifact of the build stage; since build and test stage run on different runners with fresh checkouts and images. (cherry picked from commit 8cc38267809a15ec9819bce721e52fcd90a523b9)
2018-06-25tests: Do not expect requested-by if sudo was invoked by rootJulian Andres Klode
If sudo was invoked by root, SUDO_UID will be 0, and apt will not print a Requested-By line. (cherry picked from commit 68842e1741a5005b1e3f0a07deffd737c65e3294)
2018-06-25Fix build with new gtestJulian Andres Klode
Still allow the older one to be used. Closes: #897149 (cherry picked from commit 39d9e217a22901892647499ee695ba472a111d25)
2018-04-20Release 1.6.11.6.1Julian Andres Klode
2018-04-20apt.conf.autoremove: Catch some new Ubuntu module packagesJulian Andres Klode
2018-04-20CMake: Fix builds without zstdJulian Andres Klode
Only use zstd defined variables if zstd was found.
2018-04-18Release 1.61.6Julian Andres Klode
2018-04-18Point debian-branch to 1.6.yJulian Andres Klode
2018-04-18Make libzstd optional in CMakeLists.txt, to aid cross-buildingJulian Andres Klode
This makes cross-building a bit easier, and also porting to other platforms. (cherry picked from commit 7d6994799f6782ba5e024ad0861e036d93e5f447)
2018-04-15Release 1.6~rc11.6_rc1Julian Andres Klode
2018-04-15French man pages translationjean-pierre giraud
[jak: Fix invalid empty line] Closes: #895117
2018-04-15Revert "mention mirror method in sources.list"Julian Andres Klode
This reverts commit 57a00c50b14a49ed91816e3f4467e0f2e57ee772.
2018-04-15Merge branch 'pu/heavy-hooks' into 'master'Julian Andres Klode
json-based hooks for apt cli tools See merge request apt-team/apt!10
2018-04-15Introduce experimental new hooks for command-line toolsJulian Andres Klode
This allows third-party package managers like snap or flatpak to hook in and suggest alternatives if packages could not be found, for example. This is still highly experimental and the protocol might change in future versions.
2018-04-15Merge branch 'pu/zstd' into 'master'Julian Andres Klode
pu/zstd See merge request apt-team/apt!8
2018-04-13zstd: Implement support for multi-frame filesJulian Andres Klode
This implements support for multi frame files while keeping error checking for unexpected EOF working correctly. Files with multiple frames are generated by pzstd, for example.
2018-04-13Implement compression level handling for zstdJulian Andres Klode
This is a simplified variant of the code for xz, adapted to support multiple digit integers.
2018-04-13apt-private: Collect not found packages in CacheSetHelperAPTGetJulian Andres Klode
Collecting the packages we could not find allows us to pass them to other places.
2018-04-07document Acquire::AllowReleaseInfoChange without extra sDavid Kalnischkies
Reported-By: Mattia Rizzolo on IRC
2018-04-07mention mirror method in sources.listDavid Kalnischkies
Closes: 679580
2018-04-07set our two libapt libraries to prio:optionalDavid Kalnischkies
The override file already implements this, so we just adapt to reality. Reported-By: lintian excessive-priority-for-library-package
2018-04-07fix communication typo in https manpageDavid Kalnischkies
Reported-By: lintian spelling-error-in-manpage
2018-04-07catch changelog ↔ NEWS dist mismatches in release scriptDavid Kalnischkies
At least it tries a little harder. Gbp-Dch: Ignore
2018-04-07remove duplicate changelog lines from 1.6~beta1 entryDavid Kalnischkies
Whatever caused it, lets fix it.
2018-04-06test: export GCOV_ERROR_FILE=/dev/null to make it fail less/no testsJulian Andres Klode
2018-04-06Delete /etc/dpkg/dpkg.cfg.d/excludes on Docker CI imagesJulian Andres Klode
Fixes test suite on Ubuntu docker images.
2018-04-06Allow restart_syscall() syscall in seccomp sandboxesJulian Andres Klode
Closes: #891644
2018-04-06Turn off seccomp sandboxing by defaultJulian Andres Klode
LP: #1732030 Closes: #890489 Fixes meefik/linuxdeploy#869
2018-03-23CI: Switch testing to use ubuntu:bionic for 1.6.yJulian Andres Klode
1.6.y is bionic's release series, it should be tested in it.
2018-03-19Bump cache major version to allow different 1.5 and 1.6 updatesJulian Andres Klode
Shipping 1.6 with major 12 would not allow us to update 1.5.y in a different way than 1.6.y if we have to without resorting to minor version hacks. Let's just bump the major instead.
2018-03-15Use https for Ubuntu changelogsJulian Andres Klode
We just enabled https on changelogs.ubuntu.com, let's use it.
2018-03-13Fix debian/NEWS entry for 1.6~beta1Julian Andres Klode
2018-03-12apt-inst: Add support for zstd compressed debsJulian Andres Klode
Whitelist support for zst members.
2018-03-12apt-pkg: Add support for zstdJulian Andres Klode
zstd is a compression algorithm developed by facebook. At level 19, it is about 6% worse in size than xz -6, but decompression is multiple times faster, saving about 40% install time, especially with eatmydata on cloud instances.