summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Release 2.1.202.1.20Julian Andres Klode2021-02-105-6/+15
|
* Adjust loops to use size_t instead of intJulian Andres Klode2021-02-091-3/+3
| | | | Gbp-Dch: ignore
* Fix test suite regression from StrToNum fixesJulian Andres Klode2021-02-092-56/+44
| | | | | | | | | | | | We ignored the failure from strtoul() that those test cases had values out of range, hence they passed before, but now failed on 32-bit platforms because we use strtoull() and do the limit check ourselves. Move the tarball generator for test-github-111-invalid-armember to the createdeb helper, and fix the helper to set all the numbers for like uid and stuff to 0 instead of the maximum value the fields support (all 7s). Regression-Of: e0743a85c5f5f2f83d91c305450e8ba192194cd8
* CI: Run test as user on i386Julian Andres Klode2021-02-091-0/+1
|
* Release 2.1.192.1.19Julian Andres Klode2021-02-0948-270/+249
|
* Merge branch 'pu/fuzzerpatches' into 'master'Julian Andres Klode2021-02-0930-426/+524
|\ | | | | | | | | Various patches uplifted from unfinished fuzzer branches See merge request apt-team/apt!158
| * Prevent temporary directory from triggering failure greppingDavid Kalnischkies2021-02-041-0/+1
| | | | | | | | | | | | | | | | The grep for case-insensitive GPG finds also e.g. "/tmp/tmp.Kc5kKgPg0D" which is not the intention, so we simply eliminate the variation of the /tmp directory here from the output to prevent these false positives. Gbp-Dch: Ignore
| * Remove spurious periods on progress strings in po/de.poDavid Kalnischkies2021-02-041-2/+2
| | | | | | | | | | | | They result in what looks odd: Abhängigkeitsbaum wird aufgebaut.… Fertig Statusinformationen werden eingelesen.… Fertig
| * Use size of the old cache as APT::Cache-Start defaultDavid Kalnischkies2021-02-042-5/+29
| | | | | | | | | | | | | | Depending on your configured source 25 MB is hardly enough, so the mmap housing the cache while it is build has to grow. Repeatedly. We can cut down on the repeats of this by keeping a record of the size of the old cache assuming the sizes will remain roughly in the same ballpark.
| * Limit on first patch size only for server-merged patchesDavid Kalnischkies2021-02-041-17/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | APT tries to detect if applying patches is more costly than just downloading the complete index by combining the size of the patches. That is correct for client-side merging, but for server-side merging we actually don't know if we will jump directly from old to current or have still intermediate steps in between. With this commit we assume it will be a jump from old to current through as that is what dak implements and it seems reasonable if you go to the trouble of server side merging that the server does the entire merging in one file instead of leaving additional work for the client to do. Note that this just changes the heuristic to prevent apt from discarding patches as uneconomic in the now more common one merged-patch style, it still supports multiple merged patches as before. To resolve this cleanly we would need another field in the index file declaring which hash we will arrive at if a patch is applied (or a field differentiating between these merged-patch styles at least), but that seems like overkill for now.
| * Ensure HTTP status code text has sensible contentDavid Kalnischkies2021-02-042-1/+4
| | | | | | | | | | | | | | We use the code in error messages, so at least for that edgecase we should ensure that it has sensible content. Note that the acquire system aborts on non-sensible message content in SendMessage, so you can't really exploit this.
| * Replace PrintStatus with SendMessage usageDavid Kalnischkies2021-02-048-43/+73
| | | | | | | | | | | | | | varg API is a nightmare as the symbols seems different on ever other arch, but more importantly SendMessage does a few checks on the content of the message and it is all outputted via C++ iostreams and not mixed in FILE* which is handy for overriding the streams.
| * Use error reporting instead of assert in rred patchingDavid Kalnischkies2021-02-041-68/+88
| | | | | | | | | | | | | | | | | | | | | | The rest of our code uses return-code errors and it isn't that nice to crash the rred method on bad patches anyway, so we move to properly reporting errors in our usual way which incidently also helps writing a fuzzer for it. This is not really security relevant though as the patches passed hash verification while they were downloaded, so an attacker has to overtake a trusted repository first which gives plenty better options of attack.
| * Avoid undefined pointer arithmetic while growing mmapDavid Kalnischkies2021-02-044-46/+29
| | | | | | | | | | | | | | | | | | The undefined behaviour sanitizer complains with: runtime error: addition of unsigned offset to 0x… overflowed to 0x… Compilers and runtime do the right thing in any case and it is a codepath that can (and ideally should) be avoided for speed reasons alone, but fixing it can't hurt (too much).
| * Avoid overstepping bounds in config file parsingDavid Kalnischkies2021-02-033-60/+88
| | | | | | | | | | | | | | Our configuration files are not security relevant, but having a parser which avoids crashing on them even if they are seriously messed up is not a bad idea anyway. It is also a good opportunity to brush up the code a bit avoiding a few small string copies with our string_view.
| * Forbid negative values in unsigned StrToNum explicitlyDavid Kalnischkies2021-02-032-25/+72
| | | | | | | | | | | | | | strtoul(l) surprises us with parsing negative values which should not exist in the places we use to parse them, so we can just downright refuse them rather than trying to work with them by having them promoted to huge positive values.
| * Remove Word size limit from ParseQuote and CWordDavid Kalnischkies2021-02-031-26/+17
| | | | | | | | | | | | It isn't super likely that we will encounter such big words in the real world, but we can return arbitrary length, so lets just do that as that also means we don't have to work with a second buffer.
| * Don't parse \x and \0 past the end in DeEscapeStringDavid Kalnischkies2021-02-032-4/+14
| | | | | | | | | | | | This has no attack surface though as the loop is to end very soon anyhow and the method only used while reading CD-ROM mountpoints which seems like a very unlikely attack vector…
| * Fix incorrect base64 encoding due to int promotionDavid Kalnischkies2021-02-032-1/+5
| | | | | | | | | | | | | | For \xff and friends with the highest bit set and hence being a negative value on signed char systems the wrong encoding is produced as we run into undefined behaviour accessing negative array indexes. We can avoid this problem simply by using an unsigned data type.
| * Retire and deprecate _strtabexpandDavid Kalnischkies2021-02-033-40/+15
| | | | | | | | | | | | | | | | If the Configuration code calling this was any indication, it is hard to use – and even that monster still caused heap-buffer-overflow errors, so instead of trying to fix it, lets just use methods which are far easier to use. The question why this is done at all remains, but is left for another day as an exercise for the reader.
| * Add a simple test for APT::String::DisplayLengthDavid Kalnischkies2021-02-031-0/+17
| | | | | | | | | | References: 2497198e9599a6a8d4d0ad08627bcfc7ea49c644 Gbp-Dch: Ignore
| * Fail ConfigDir reading if directory listing failedDavid Kalnischkies2021-02-031-1/+4
| | | | | | | | | | | | We were printing an error and hence have non-zero exit code either way, but API wise it makes sense to have this properly reported back to the caller to propagate it down the chain e.g. while parsing #include stanzas.
| * Free XXH3 state to avoid leak in cache hashingDavid Kalnischkies2021-02-031-1/+3
| | | | | | | | | | We do this once (usually), so the leak is tremendously big, but it is detected as a leak by the fuzzer and trips it up.
| * Remove unused config check for pre-XXH3 cache hashingDavid Kalnischkies2021-02-033-45/+0
| | | | | | | | | | References: 1460eebf2abe913df964e031eff081a57f043697 Gbp-Dch: Ignore
| * Guess compressor only if no AR nember with exact name existsDavid Kalnischkies2021-02-022-26/+35
| | | | | | | | | | | | | | | | | | | | | | Explicitly opening a tar member is a bit harder than it needs to be as you have to remove the compressor extension so that it can be guessed here gain potentially choosing the wrong member. Doesn't really matter for deb packages of course as the member count is pretty low and strongly defined, but testing is easier this way. It also finally fixes an incorrectly formatted error message.
| * Use 500 MB memory limit for xz/lzma decodingDavid Kalnischkies2021-02-021-15/+6
| | | | | | | | | | | | | | | | | | | | | | | | The buffers we feed in and read out are usually a couple kilobytes big so allowing lzma to use an unlimited amount of memory is easy & okay, but not needed and confuses memory checkers as it will cause lzma to malloc a huge chunk of memory (which it will never use). So lets just use a "big enough" value instead. In exchange we simplify the decoder calling as we were already using the auto-variant for xz, so we can just avoid the if-else and let liblzma decide what it decodes.
* | Merge branch 'bugfix/deptreedone' into 'master'Julian Andres Klode2021-02-091-0/+3
|\ \ | | | | | | | | | | | | Show 'Done' always for 'Building dependency tree' See merge request apt-team/apt!157
| * | Show 'Done' always for 'Building dependency tree'David Kalnischkies2021-02-041-0/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For years I subconsciously thought this is wrong but ignored it: $ LANG=C apt install -s Reading package lists... Done Building dependency tree Reading state information... Done Then I noticed: $ LANG=C apt install -s -o dir::state::extended_states=/dev/null Reading package lists... Done Building dependency tree... Done That can't be! Then it really should be: $ LANG=C apt install -s Reading package lists... Done Building dependency tree... Done Reading state information... Done This oddity seems to be in since the introduction of the auto bit in 2005 which makes this rather hard to solve in theory, but in practice no front end seems to call the readStateFile method directly, so we might actually be lucky. The alternative would be to call Done in the calling method and again at the end of readStateFile while dropping it from the current place, but as that is more shuffling around it could be more upsetting for other front ends. Not sure, but now that I have seen it, I want to have it fixed one way or another… aptitude at least seems not to explode. References: afb1e2e3bb580077c6c917e6ea98baad8f3c39b3
* | Dutch manpages translation updateFrans Spiesschaert2021-02-041-82/+63
| | | | | | | | Closes: #981883
* | Dutch program translation updateFrans Spiesschaert2021-02-041-10/+4
|/ | | | Closes: #981885
* Merge branch 'pu/include-all-translations' into 'master'Julian Andres Klode2021-01-272-1/+14
|\ | | | | | | | | Include all translations when building the cache See merge request apt-team/apt!156
| * Include all translations when building the cacheJulian Andres Klode2021-01-272-1/+14
| | | | | | | | | | | | | | | | | | We do download all translations we ever downloaded, but we don't add all of those to the cache, meaning that if we run update with LANG=C, it might still download your de_DE translation, but it won't insert it into the cache, causing your de_DE user to not get translated messages. LP: #1907850
* | Merge branch 'master' into 'master'Julian Andres Klode2021-01-241-2/+2
|\ \ | | | | | | | | | | | | vendor: Adjust Debian -security codename See merge request apt-team/apt!155
| * | vendor: Adjust Debian -security codenameWolfgang Schweer2021-01-241-2/+2
|/ / | | | | | | Signed-off-by: Wolfgang Schweer <wschweer@arcor.de>
* | Merge branch 'fix-doc-entity' into 'master'Julian Andres Klode2021-01-231-1/+1
|\ \ | | | | | | | | | | | | Fix apt-acquire-additional-files entity's location. See merge request apt-team/apt!154
| * | Fix apt-acquire-additional-files entity's location.Diederik de Haas2021-01-231-1/+1
|/ /
* | Merge branch 'youfu-ExecDpkg-patch' into 'master'Julian Andres Klode2021-01-221-1/+1
|\ \ | | | | | | | | | | | | fix passing readonly /dev/null fd as stdout/stderr See merge request apt-team/apt!153
| * | dpkg: fix passing readonly /dev/null fd as stdout/stderrYoufu Zhang2021-01-221-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | The read-only /dev/null was duplicated to stdout and stderr, causing writes to those descriptors to fail: [pid 260] openat(AT_FDCWD, "/dev/null", O_RDONLY) = 7 [pid 260] dup2(7, 0) = 0 [pid 260] close(5) = 0 [pid 260] dup2(6, 1) = 1 [pid 260] dup2(7, 2) = 2 [pid 260] write(2, "Chrooting into ", 15) = -1 EBADF (Bad file descriptor) [pid 260] chroot("/chroot/") = 0
* / German program translation updateHelge Kreutzmann2021-01-131-5/+5
|/ | | | Closes: #979848
* Release 2.1.182.1.18Julian Andres Klode2021-01-135-6/+13
|
* Adjust apt-mark test for dpkg 1.20.7Julian Andres Klode2021-01-131-2/+13
|
* pkgcachegen: Avoid write to old cache for Version::ExtraJulian Andres Klode2021-01-131-1/+2
| | | | | | | | Assigning the result of AllocateInMap directly to Ver->d caused Ver->d to be resolved first, and hence if Ver was remapped during the AllocateInMap, we were trying to assign to the old value. Closes: #980037
* Release 2.1.172.1.17Julian Andres Klode2021-01-117-8/+19
|
* Merge branch 'pu/misc-fixes-2-1-16' into 'master'Julian Andres Klode2021-01-112-1/+7
|\ | | | | | | | | Misc fixes See merge request apt-team/apt!152
| * Call ischroot with -tJulian Andres Klode2021-01-111-0/+1
| | | | | | | | | | | | | | We interpreted "cannot detect chroot" as "not a chroot", but it's arguably the better idea to detect it as a chroot, to avoid new behavior from phased updations in situations where it's unclear (no /proc mounted or stuff).
| * kernels: Fix std::out_of_range if no kernels to protectJulian Andres Klode2021-01-111-1/+6
|/ | | | | In case we did not find any kernels to protect, the regular expression will be empty, and trying to substr(1) it will fail.
* Portuguese manpages translation updateAmérico Monteiro2021-01-101-72/+57
| | | | Closes: #979725
* Release 2.1.16 - "Happy build-essential freeeze" release2.1.16Julian Andres Klode2021-01-0859-88/+2279
|
* Fixup manual page docbook syntaxJulian Andres Klode2021-01-082-6/+8
| | | | | | | No idea why we don't have manual page syntax check (what prepare-release post-build does) in CI. Should fix that eventually. Gbp-Dch: ignore
* Merge branch 'pu/small-fixes' into 'master'Julian Andres Klode2021-01-082-4/+4
|\ | | | | | | | | Pu/small fixes See merge request apt-team/apt!151