pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/sysutils/py-borgbackup



Module Name:    pkgsrc
Committed By:   wiz
Date:           Wed Sep  6 07:21:21 UTC 2023

Modified Files:
        pkgsrc/sysutils/py-borgbackup: Makefile distinfo

Log Message:
py-borgbackup: update to 1.2.6.

Pre-1.2.5 archives spoofing vulnerability (CVE-2023-36811)
----------------------------------------------------------

A flaw in the cryptographic authentication scheme in Borg allowed an attacker to
fake archives and potentially indirectly cause backup data loss in the repository.

The attack requires an attacker to be able to

1. insert files (with no additional headers) into backups
2. gain write access to the repository

This vulnerability does not disclose plaintext to the attacker, nor does it
affect the authenticity of existing archives.

Creating plausible fake archives may be feasible for empty or small archives,
but is unlikely for large archives.

The fix enforces checking the TAM authentication tag of archives at critical
places. Borg now considers archives without TAM as garbage or an attack.

We are not aware of others having discovered, disclosed or exploited this vulnerability.

Below, if we speak of borg 1.2.5, we mean a borg version >= 1.2.5 **or** a
borg version that has the relevant security patches for this vulnerability applied
(could be also an older version in that case).

Steps you must take to upgrade a repository:

1. Upgrade all clients using this repository to borg 1.2.6.
   Note: it is not required to upgrade a server, except if the server-side borg
   is also used as a client (and not just for "borg serve").

   Do **not** run ``borg check`` with borg > 1.2.4 before completing the upgrade steps.

2. Run ``BORG_WORKAROUNDS=ignore_invalid_archive_tam borg info --debug <repo> 2>&1 | grep TAM | grep -i manifest``.

   a) If you get "TAM-verified manifest", continue with 3.
   b) If you get "Manifest TAM not found and not required", run
      ``borg upgrade --tam --force <repository>`` *on every client*.

3. Run ``BORG_WORKAROUNDS=ignore_invalid_archive_tam borg list --format='{name} {time} tam:{tam}{NL}' <repo>``.
   "tam:verified" means that the archive has a valid TAM authentication.
   "tam:none" is expected as output for archives created by borg <1.0.9.
   "tam:none" is also expected for archives resulting from a borg rename
   or borg recreate operation (see #7791).
   "tam:none" could also come from archives created by an attacker.
   You should verify that "tam:none" archives are authentic and not malicious
   (== have good content, have correct timestamp, can be extracted successfully).
   In case you find crappy/malicious archives, you must delete them before proceeding.
   In low-risk, trusted environments, you may decide on your own risk to skip step 3
   and just trust in everything being OK.

4. If there are no tam:none archives left at this point, you can skip this step.
   Run ``BORG_WORKAROUNDS=ignore_invalid_archive_tam borg upgrade --archives-tam <repo>``.
   This will unconditionally add a correct archive TAM to all archives not having one.
   ``borg check`` would consider TAM-less or invalid-TAM archives as garbage or a potential attack.
   To see that all archives now are "tam:verified" run: ``borg list --format='{name} {time} tam:{tam}{NL}' <repo>``

5. Please note that you should never use BORG_WORKAROUNDS=ignore_invalid_archive_tam
   for normal production operations - it is only needed once to get the archives in a
   repository into a good state. All archives have a valid TAM now.

Vulnerability time line:

* 2023-06-13: Vulnerability discovered during code review by Thomas Waldmann
* 2023-06-13...: Work on fixing the issue, upgrade procedure, docs.
* 2023-06-30: CVE was assigned via Github CNA
* 2023-06-30 .. 2023-08-29: Fixed issue, code review, docs, testing.
* 2023-08-30: Released fixed version 1.2.5 (broken upgrade procedure for some repos)
* 2023-08-31: Released fixed version 1.2.6 (fixes upgrade procedure)

Version 1.2.6 (2023-08-31)
--------------------------

For upgrade and compatibility hints, please also read the section "Upgrade Notes"
above.

Fixes:

- The upgrade procedure docs as published with borg 1.2.5 did not work, if the
  repository had archives resulting from a borg rename or borg recreate operation.

  The updated docs now use BORG_WORKAROUNDS=ignore_invalid_archive_tam at some
  places to avoid that issue, #7791.

  See: fix pre-1.2.5 archives spoofing vulnerability (CVE-2023-36811),
  details and necessary upgrade procedure described above.

Other changes:

- updated 1.2.5 changelog entry: 1.2.5 already has the fix for rename/recreate.
- remove cython restrictions. recommended is to build with cython 0.29.latest,
  because borg 1.2.x uses this since years and it is very stable.
  you can also try to build with cython 3.0.x, there is a good chance that it works.
  as a 3rd option, we also bundle the `*.c` files cython outputs in the release
  pypi package, so you can also just use these and not need cython at all.


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 pkgsrc/sysutils/py-borgbackup/Makefile
cvs rdiff -u -r1.31 -r1.32 pkgsrc/sysutils/py-borgbackup/distinfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/sysutils/py-borgbackup/Makefile
diff -u pkgsrc/sysutils/py-borgbackup/Makefile:1.45 pkgsrc/sysutils/py-borgbackup/Makefile:1.46
--- pkgsrc/sysutils/py-borgbackup/Makefile:1.45 Thu Aug 31 14:53:48 2023
+++ pkgsrc/sysutils/py-borgbackup/Makefile      Wed Sep  6 07:21:21 2023
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.45 2023/08/31 14:53:48 bsiegert Exp $
+# $NetBSD: Makefile,v 1.46 2023/09/06 07:21:21 wiz Exp $
 
-DISTNAME=      borgbackup-1.2.5
+DISTNAME=      borgbackup-1.2.6
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
 CATEGORIES=    sysutils python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=b/borgbackup/}

Index: pkgsrc/sysutils/py-borgbackup/distinfo
diff -u pkgsrc/sysutils/py-borgbackup/distinfo:1.31 pkgsrc/sysutils/py-borgbackup/distinfo:1.32
--- pkgsrc/sysutils/py-borgbackup/distinfo:1.31 Thu Aug 31 14:53:48 2023
+++ pkgsrc/sysutils/py-borgbackup/distinfo      Wed Sep  6 07:21:21 2023
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.31 2023/08/31 14:53:48 bsiegert Exp $
+$NetBSD: distinfo,v 1.32 2023/09/06 07:21:21 wiz Exp $
 
-BLAKE2s (borgbackup-1.2.5.tar.gz) = aa66a4172097590dbefb7a9273c38234e20837e192d9d03edbe2184da205496f
-SHA512 (borgbackup-1.2.5.tar.gz) = 7bb89d8217cda1973a711cb2debbb30b0dc7c0dcfa6d707ce3950834d3beb0c6201eb6baecab80a4cd32d3fa288a28891641d70ad3ed37350dea0c5d22ce376e
-Size (borgbackup-1.2.5.tar.gz) = 4074588 bytes
+BLAKE2s (borgbackup-1.2.6.tar.gz) = 544ba97f49a688f8a48d0a9ee0ad6b3130a67607e5c31b7351ef0b9e8c307c15
+SHA512 (borgbackup-1.2.6.tar.gz) = 264bf023f4a53f79d8359e1ed0678c7572ad24776e0ddbc5d3446f548629ecea1e0798c33df4464573b1258f47220c86ca964673501dd9b3018484f1f86280f7
+Size (borgbackup-1.2.6.tar.gz) = 4355451 bytes



Home | Main Index | Thread Index | Old Index