Bug 22915 - After update of python-paramiko duplicity shows warnings on connect
Summary: After update of python-paramiko duplicity shows warnings on connect
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 6
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA6-64-OK MGA6-32-OK
Keywords: advisory, validated_update
Depends on:
Blocks:
 
Reported: 2018-04-15 22:41 CEST by Marc Krämer
Modified: 2018-05-12 09:58 CEST (History)
7 users (show)

See Also:
Source RPM: python-paramiko-2.0.8-1.mga6.src.rpm
CVE:
Status comment:


Attachments

Description Marc Krämer 2018-04-15 22:41:25 CEST
After the latest update I get these warnings:
/usr/lib/python2.7/site-packages/paramiko/ecdsakey.py:202: DeprecationWarning: signer and verifier have been deprecated. Please use sign and verify instead.
  signature, ec.ECDSA(self.ecdsa_curve.hash_object())
/usr/lib/python2.7/site-packages/paramiko/rsakey.py:110: DeprecationWarning: signer and verifier have been deprecated. Please use sign and verify instead.
  algorithm=hashes.SHA1(),
/usr/lib/python2.7/site-packages/paramiko/ecdsakey.py:202: DeprecationWarning: signer and verifier have been deprecated. Please use sign and verify instead.
  signature, ec.ECDSA(self.ecdsa_curve.hash_object())
/usr/lib/python2.7/site-packages/paramiko/rsakey.py:110: DeprecationWarning: signer and verifier have been deprecated. Please use sign and verify instead.
  algorithm=hashes.SHA1(),

Since backups are cron based, I get this message regulary.
Marja Van Waes 2018-04-15 23:02:02 CEST

CC: (none) => makowski.mageia, marja11
Assignee: bugsquad => python

Comment 1 Jani Välimaa 2018-04-22 12:28:07 CEST
Pushed python-paramiko-2.0.8-1.1.mga6 with a patch backported from upstream to core/updates_testing. Please test.

CC: (none) => jani.valimaa

Comment 2 Marc Krämer 2018-04-23 08:29:56 CEST
works for me, no more messages on console. Backup works.
Comment 3 Jani Välimaa 2018-04-24 06:29:27 CEST
Assigning to QA team.

Assignee: python => qa-bugs

Comment 4 Len Lawrence 2018-04-24 09:50:04 CEST
Testing this on Mageia 6, x86_64.
This was tested recently, bug #22837, using the backup utility duplicity.  Ran a quick test to recover an existing backup from another machine and a particular folder from that backup.  That worked as expected.

I need to figure out what this ECDSA signature stuff means.  It was not previously tested.

CC: (none) => tarazed25

Comment 5 Marc Krämer 2018-04-24 11:17:26 CEST
This is caused if the backup is (re-)stored via ssh backend. For my scripts this is run


duplicity ${DUPOPTIONS} ${CMD} sftp://${SERVER}/${NAME} --name ${NAME} --ssh-options='-i /etc/ssh/ssh_host_rsa_key' --archive-dir /mnt/backuplog/
Comment 6 Len Lawrence 2018-04-24 20:59:21 CEST
Using release version of python-paramiko.

Tried various commands modelled on Marc's comment 5 example but could not get them to work, let alone reproduce the ECDSA problems, a matter of pure ignorance on my part probably.  e.g.
$ cat duplicity.sh
export PASSPHRASE=Rapunzel22
export TARGET=$1
export FOLDER=$2
duplicity ${FOLDER} scp://lcl@vega/${TARGET} --ssh-options='-i /home/lcl/.ssh/known_hosts'
$ ./duplicity.sh /home/lcl/docs /data/backup4
BackendException: ssh connection to lcl@vega:22 failed: Private key file is encrypted

Tried removing the vega ecdsa entries from known_hosts then:
$ ./duplicity.sh /home/lcl/docs /data/backup4
The authenticity of host 'vega' can't be established.
ECDSA-SHA2-NISTP256 key fingerprint is 2a:4f:06:bf:c6:c1:3e:f8:4b:8c:15:30:e5:e8:e6:bb.
Are you sure you want to continue connecting (yes/no)? yes
BackendException: ssh connection to lcl@vega:22 failed: Private key file is encrypted
$ ssh lcl@vega
Warning: Permanently added the ECDSA host key for IP address '192.168.1.3' to the list of known hosts.
Password: 
[lcl@vega ~]$ exit


The following simple commands do work:

$ duplicity /home/lcl/ruby sftp://lcl:<password>@vega//data/backup2
Local and Remote metadata are synchronized, no sync needed.
Last full backup date: none
GnuPG passphrase: <whatever>
Retype passphrase to confirm: <whatever>
No signatures found, switching to full backup.
--------------[ Backup Statistics ]--------------
StartTime 1524593035.00 (Tue Apr 24 19:03:54 2018)
EndTime 1524593037.46 (Tue Apr 24 19:03:57 2018)
ElapsedTime 2.47 (2.47 seconds)
SourceFiles 2200
SourceFileSize 61506433 (58.7 MB)
NewFiles 2200
NewFileSize 61506433 (58.7 MB)
DeletedFiles 0
ChangedFiles 0
ChangedFileSize 0 (0 bytes)
ChangedDeltaSize 0 (0 bytes)
DeltaEntries 2200
RawDeltaSize 60642119 (57.8 MB)
TotalDestinationSizeChange 27167984 (25.9 MB)
Errors 0
-------------------------------------------------

$ duplicity scp://lcl:<password>@vega//data/backup2 tmp/backup2 
Synchronising remote metadata to local cache...
GnuPG passphrase: <whatever> 
Copying duplicity-full-signatures.20180424T180314Z.sigtar.gpg to local cache.
Copying duplicity-full.20180424T180314Z.manifest.gpg to local cache.
Last full backup date: Tue Apr 24 19:03:14 2018

Local tmp/backup2 contained a full copy of the original folder.

Not worth continuing this investigation - don't know enough about this signature and encryption business.
Comment 7 Marc Krämer 2018-04-24 21:42:57 CEST
@Lens: no that's ok. I just have a few more variables.
Comment 8 Len Lawrence 2018-04-24 23:35:26 CEST
Thanks Marc.  Since the whole point of the bug is to address the issue you are having it needs to be sorted.  I am dropping it because I don't have the background to understand how to reproduce it but there must be somebody else who could (?).  My apologies anyway.  None of us in QA likes to throw in the towel on any bug.
Comment 9 Herman Viaene 2018-04-25 10:04:50 CEST
MGA6-32 on Dell Latitude D600 MATE
No installation issues
Following the duplicity ftp example from Comment 6, I made a similar attempt, and straced the duplicity command.
The command fails ultimately because the backup requires some 260+Mb on temp space ans my very limited setup has only 248Mb.
But the strace shows some apparently successfull calls (at least no errors) on paramiko. Same for a backup to a local folder.
At least in my opinion there is proof that the update does not impact the normal working of duplicity. If Len agrees to OK, I won't object.

CC: (none) => herman.viaene

Comment 10 Len Lawrence 2018-04-25 19:02:20 CEST
Thanks for the 32-bit test Herman.  I agree that our tests show that duplicity works OK but I am not willing to give it the OK here unless Marc can say that he no longer has a problem.  This would be the second time recently that we have had to ask somebody outside the team to add a confirmation - not ideal at all.  It is just that some bugs occur within such a narrow set of circumstances that we can find them difficult or impossible to reproduce.  Mind you we do pass updates when PoCs do not provide a definitive test.  Need a third opinion on this.
Comment 11 Marc Krämer 2018-04-26 12:22:30 CEST
@Len: I don't think you can cover all things that change in an update process by upstream.
I don't know exactly what this python library does and how it interacts with ssh connections, I assume it has sth. to do with the specific encryption method used (ecdsa asymetric keys). 

I've had a look at the patch which Jani applied, and this looks like the subsystem of paramiko was not updated correctly to their changes. This patch just changes the old method names to the new ones which do not show this warning.

For me, I have checked the patch on 3 machines, with no more messages.
Comment 12 Len Lawrence 2018-04-26 17:40:08 CEST
OK Marc, thanks for the additional information.  And 64-bit OK it is.

Whiteboard: (none) => MGA6-64-OK

Comment 13 Len Lawrence 2018-04-26 17:42:00 CEST
OK also for Herman's 32-bit test.

Whiteboard: MGA6-64-OK => MGA6-64-OK MGA6-32-OK

Len Lawrence 2018-04-26 17:44:00 CEST

Keywords: (none) => validated_backport

Comment 14 Thomas Backlund 2018-05-12 09:08:20 CEST
This is an update, not a backport, advisory added to svn

Keywords: validated_backport => advisory, validated_update
CC: (none) => tmb, sysadmin-bugs

Comment 15 Mageia Robot 2018-05-12 09:58:47 CEST
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGAA-2018-0077.html

Resolution: (none) => FIXED
Status: NEW => RESOLVED


Note You need to log in before you can comment on or make changes to this bug.