Debian Codegraph @

debian/patches/Fix-Ubuntu-Jammy-FIPS-mode-crash.patch

raw
1 From: Eric Berry <[email protected]>
2 Date: Mon, 9 Sep 2024 14:49:49 -0700
3 Subject: Fix Ubuntu Jammy FIPS mode crash
4
5 When one enables FIPS mode on a Jammy system and then attempts to use
6 paramiko in Python, the module crashes.
7
8 Bug: https://github.com/paramiko/paramiko/issues/2442
9 Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/paramiko/+bug/2072974
10 Forwarded: https://github.com/paramiko/paramiko/issues/2442<F5>
11 ---
12 paramiko/kex_curve25519.py | 3 +++
13 1 file changed, 3 insertions(+)
14
15 Index: paramiko/paramiko/kex_curve25519.py
16 ===================================================================
17 --- paramiko.orig/paramiko/kex_curve25519.py
18 +++ paramiko/paramiko/kex_curve25519.py
19 @@ -1,6 +1,7 @@
20 import binascii
21 import hashlib
22
23 +import cryptography.exceptions
24 from cryptography.exceptions import UnsupportedAlgorithm
25 from cryptography.hazmat.primitives import constant_time, serialization
26 from cryptography.hazmat.primitives.asymmetric.x25519 import (
27 @@ -30,6 +31,8 @@ class KexCurve25519:
28 X25519PrivateKey.generate()
29 except UnsupportedAlgorithm:
30 return False
31 + except cryptography.exceptions.InternalError:
32 + return False
33 else:
34 return True
35