Skip to content
Snippets Groups Projects
  1. Mar 19, 2021
  2. Mar 16, 2021
  3. Mar 13, 2021
    • Martin Vahlensieck's avatar
      Use correct port when redirected · 63d05ee4
      Martin Vahlensieck authored and Timo Teräs's avatar Timo Teräs committed
      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
  4. Feb 07, 2021
    • Timo Teräs's avatar
      apk-tools-2.12.3 · 55753744
      Timo Teräs authored
      v2.12.3
      55753744
    • Timo Teräs's avatar
      db: fix control character check to use uint8_t · ab7b8e3c
      Timo Teräs authored
      fixes #10737
      ab7b8e3c
    • Timo Teräs's avatar
      apk-tools-2.12.2 · 43b0b5fa
      Timo Teräs authored
      v2.12.2
      43b0b5fa
    • Timo Teräs's avatar
      db: consider control characters in filename as malicious · c1594f60
      Timo Teräs authored
      
      Especially a newline can produce havoc in the database file as
      the filename is written there as-is. This hardenes the extraction
      to consider any control character as malicious. Additional
      hardening is added to database loading to better detect corrupt
      state and return proper error code about it.
      
      Reported-by: default avatarLuca Weiss <luca@z3ntu.xyz>
      c1594f60
    • Olliver Schinagl's avatar
      io: Handle really long lines · 77adfc5e
      Olliver Schinagl authored and Timo Teräs's avatar Timo Teräs committed
      
      While commit 18b0b45b (io: Handle long lines, Thu Jan 7 17:25:23 2021
      +0100) did attempt to address this issue, the buffer really is still to
      small when dealing with big-big dependency lists.
      
      Lets make it sufficiently large for now, until the new APKINDEX format
      can support multi-line dependencies, making this not needed any more.
      
      [TT: Originally the buffer size was conservative to run on resource
      constrained embedded platforms. But since the available memory on those
      has also increased much, the adjustment to 128kB makes sense also to
      increase performance a little bit. Removing also the iolimit test.]
      
      Signed-off-by: default avatarOlliver Schinagl <oliver@schinagl.nl>
      77adfc5e
    • Timo Teräs's avatar
      gunzip: fix false end-of-file condition in rare circumstances · 5e62eee4
      Timo Teräs authored
      It turns out inflate() can output zero bytes, even if it consumed
      data. This had the unfortunate side effect of returning zero bytes
      (end-of-file) condition before calling the boundary callbacks. This
      fixes the logic to not return zero reads on gzip boundary.
      
      In practice this fixes the seldom seen issues of apk reporting
      bad signature (when it was correct).
      5e62eee4
  5. Jan 19, 2021
    • Timo Teräs's avatar
      apk-tools-2.12.1 · e1418705
      Timo Teräs authored
      v2.12.1
      e1418705
    • 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 and Timo Teräs's avatar Timo Teräs committed
      Instead of skipping just one line, properly parse the response headers.
      
      [TT: reworded commit message]
      b1935a1e
  6. Jan 17, 2021
  7. Jan 14, 2021
  8. Jan 11, 2021
  9. Jan 08, 2021
  10. Dec 29, 2020
  11. Nov 11, 2020
  12. Nov 10, 2020
  13. Oct 09, 2020
  14. Oct 07, 2020
  15. Oct 06, 2020
  16. Oct 05, 2020
  17. Oct 03, 2020
  18. Oct 01, 2020
  19. Sep 28, 2020
  20. Aug 29, 2020
  21. Aug 26, 2020
  22. Aug 25, 2020
Loading