1. 29 Jun, 2022 1 commit
  2. 26 May, 2022 2 commits
  3. 25 May, 2022 10 commits
  4. 24 May, 2022 1 commit
    • Guillem Jover's avatar
      Dpkg::Source::Archive: Prevent directory traversal for in-place extracts · 7a6c03cb
      Guillem Jover authored
      
      
      For untrusted v2 and v3 source package formats that include a debian.tar
      archive, when we are extracting it, we do that as an in-place extraction,
      which can lead to directory traversal situations on specially crafted
      orig.tar and debian.tar tarballs.
      
      GNU tar replaces entries on the filesystem by the entries present on
      the tarball, but it will follow symlinks when the symlink pathname
      itself is not present as an actual directory on the tarball.
      
      This means we can create an orig.tar where there's a symlink pointing
      out of the source tree root directory, and then a debian.tar that
      contains an entry within that symlink as if it was a directory, without
      a directory entry for the symlink pathname itself, which will be
      extracted following the symlink outside the source tree root.
      
      This is currently noted as expected in GNU tar documentation. But even
      if there was a new extraction mode avoiding this problem we'd need such
      new version. Using perl's Archive::Tar would solve the problem, but
      switching to such different pure perl implementation, could cause
      compatibility or performance issues.
      
      What we do is when we are requested to perform an in-place extract, we
      instead still use a temporary directory, then walk that directory and
      remove any matching entry in the destination directory, replicating what
      GNU tar would do, but in addition avoiding the directory traversal issue
      for symlinks. Which should work with any tar implementation and be safe.
      
      Reported-by: default avatarMax Justicz <max@justi.cz>
      Stable-Candidates: 1.18.x 1.19.x 1.20.x
      Fixes: commit 0c0057a2 (1.14.17)
      Fixes: CVE-2022-1664
      7a6c03cb
  5. 16 Apr, 2022 1 commit
  6. 09 Apr, 2022 3 commits
  7. 01 Apr, 2022 6 commits
  8. 31 Mar, 2022 1 commit
  9. 30 Mar, 2022 3 commits
  10. 29 Mar, 2022 9 commits
  11. 28 Mar, 2022 3 commits