Skip to content
Snippets Groups Projects
  1. Jul 23, 2021
    • Rodrigo Lourenço's avatar
    • Rodrigo Lourenço's avatar
      Document apk-search · 467cb7ca
      Rodrigo Lourenço authored
      Fixes #10746.
      467cb7ca
    • Timo Teräs's avatar
      Remove AUTHORS section from man pages · a4e2de2d
      Timo Teräs authored
      Use of an AUTHORS section is strongly discouraged. Generally, it
      is better not to clutter every page with a list of (over time
      potentially numerous) authors.
      
      Add your name to comments in sources, or the root level AUTHORS
      file instead.
      a4e2de2d
    • Sören Tempel's avatar
      Disable progress bar on dumb terminals by default · 0acfe394
      Sören Tempel authored
      The progress bar requires the terminal emulator to support ANSI escape
      sequences. Normally, TERM is set to dumb to indicate that the terminal
      emulator doesn't support any ANSI escape sequences. Attempting to use
      ANSI escape sequences on dumb terminals will lead to weird output. In
      order to make apk work by default, even on dumb terminals, this commit
      introduces an additional check which consults $TERM and disables the
      progress bar if it is set to "dumb".
      
      [TT: backported to 2.12]
      0acfe394
  2. May 20, 2021
    • Timo Teräs's avatar
      solver: don't consider requirer count for preference · 3cce27e8
      Timo Teräs authored
      The original intent was to choose packages to which there is most
      dependencies. However, since the code has evolved this is has been
      mostly obsolete. And in fact now interferes with the provides and
      provides priority mechanism. Remove this as obsolete.
      
      Fixes #10742
      3cce27e8
  3. Apr 12, 2021
  4. Apr 11, 2021
    • Timo Teräs's avatar
      io_archive: add bounds limit for uname and gname tar header fields · ca598e2a
      Timo Teräs authored
      
      Modify apk_resolve_[ug]id to take the user/groupname as a blob, so
      proper length checking is done and honored.
      
      ==31584== Conditional jump or move depends on uninitialised value(s)
      ==31584==    at 0x5C8CA5: strlen (strlen.c:17)
      ==31584==    by 0x432575: APK_BLOB_STR (apk_blob.h:79)
      ==31584==    by 0x4350EB: apk_resolve_uid (io.c:1112)
      ==31584==    by 0x43696C: apk_tar_parse (io_archive.c:152)
      ==31584==    by 0x4271BC: apk_pkg_read (package.c:929)
      ==31584==    by 0x402D75: add_main (app_add.c:163)
      ==31584==    by 0x40D5FF: main (apk-static.c:516)
      
      Fixes a potential crash (DoS) on a crafted TAR file. CVE-2021-30139.
      
      Reported-by: default avatarSören Tempel <soeren+git@soeren-tempel.net>
      Reviewed-by: default avatarAriadne Conill <ariadne@dereferenced.org>
      ca598e2a
    • Timo Teräs's avatar
      io: fix fd leak in error handling paths · 3c339a74
      Timo Teräs authored
      apk_dir_foreach_file and apk_resolve_[ug]id needs to free the fd in
      case fdopen/fdopendir fails. Additionally this does not rely on fdopen
      to fail if openat() returned -1, making sure that we don't call any
      syscalls with invalid file handle.
      3c339a74
  5. Mar 23, 2021
  6. Mar 19, 2021
    • Ariadne Conill's avatar
      database: do not chroot(".") unless actually necessary · 73504fb7
      Ariadne Conill authored
      If we use default root (/), then we do not have to chroot to run scripts.
      Use APK_NO_CHROOT flag for this scenario to avoid the chroot.  This helps
      with using apk with bwrap and OSTree.
      
      Closes #10736.
      
      [TT: backported to 2.12-stable]
      73504fb7
    • Timo Teräs's avatar
      del: report correctly package's provides names · ff0ea826
      Timo Teräs authored
      The code assumed that when package is in world, it would be there
      by it's primary name. The code is now updated to properly print the
      package names that are actually present in world.
      
      fixes #10718
      ff0ea826
  7. Mar 16, 2021
  8. Mar 13, 2021
    • Martin Vahlensieck's avatar
      Use correct port when redirected · 63d05ee4
      Martin Vahlensieck authored
      If server redirects from http to https, libfetch detects this, but
      wrongly uses the old url scheme to determine the port. This subsequently
      leads to the following OpenSSL error:
      
      139741541575496:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:ssl/record/ssl3_record.c:331:
      
      Using the new scheme fixes this.  This error message comes from trying
      to connect to port 80 with TLS, it can also be observed by issuing
        $ openssl s_client -connect alpinelinux.org:80
      
      This bug was introduced in commit:
      7158474f libfetch: keep http auth only if redirect is for the same host
      63d05ee4
  9. Feb 07, 2021
  10. Jan 19, 2021
    • Timo Teräs's avatar
    • Timo Teräs's avatar
      libfetch: harden URL parsing · 5edd60a4
      Timo Teräs authored
      Treat URLs with too long individual components as malformed instead
      of silently truncating that field. There might be unexpected results
      if hostname, username or password field gets truncated.
      5edd60a4
    • Timo Teräs's avatar
      libfetch: fix connection pooling for proxied http/https requests · aa1f935c
      Timo Teräs authored
      The connection pooling was broken in two ways:
      
       1. The original URL was always used as the connection pool URL,
          resulting in duplicate connections to the proxy for http URLs
          (each http URL would get separate proxy connection)
      
       2. The cache_url stored was always the socket level connect URL.
          In case of HTTPS, the lookup was done done with the real URL,
          but the proxy URL was stored as the "cache URL". Thus HTTPS
          CONNECT connections were never re-used.
      
      This fixes the code with following logic:
      
       1. The cache key url is the real URL when no-proxy, or when HTTPS
          with proxy (the socket is connected to proxy, but logically it
          is connected to the real URL due to HTTP CONNECT request).
          And for HTTP with proxy, it's the proxy URL so same proxy
          connection can be reused for all requests going through it.
      
       2. fetch_connect() now gets cache key URL separately, and it always
          gets the same value as the fetch_cache_get() calls.
      aa1f935c
    • Timo Teräs's avatar
      libfetch: fix use-after-free in connection cache management · c37b385b
      Timo Teräs authored
      fixes #10734
      c37b385b
    • Conny Seifert's avatar
      libfetch: fix parsing of proxy response to CONNECT requests · b1935a1e
      Conny Seifert authored
      Instead of skipping just one line, properly parse the response headers.
      
      [TT: reworded commit message]
      b1935a1e
  11. Jan 17, 2021
  12. Jan 14, 2021
  13. Jan 11, 2021
  14. Jan 08, 2021
  15. Dec 29, 2020
  16. Nov 11, 2020
  17. Nov 10, 2020
  18. Oct 09, 2020
  19. Oct 07, 2020
  20. Oct 06, 2020
  21. Oct 05, 2020
Loading