summaryrefslogtreecommitdiffstats
path: root/testing/source/PAM/a/pam/fedora-patches/pam-1.3.1-unix-checksalt_syslog.patch
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2020-02-12 05:05:50 +0000
committer Eric Hameleers <alien@slackware.com>2020-02-12 17:59:48 +0100
commit6a63f41b3b49b8f8f86b40166b782d907ccb2538 (patch)
tree7d2c77a55463f5586ec453e13602ff2889030f84 /testing/source/PAM/a/pam/fedora-patches/pam-1.3.1-unix-checksalt_syslog.patch
parente1ab44f93f91f5c967ac1b7143c7a8ac287d1a52 (diff)
downloadcurrent-6a63f41b3b49b8f8f86b40166b782d907ccb2538.tar.gz
current-6a63f41b3b49b8f8f86b40166b782d907ccb2538.tar.xz
Wed Feb 12 05:05:50 UTC 202020200212050550
Hey folks! PAM has finally landed in /testing. Some here wanted it to go right into the main tree immediately, and in a more normal development cycle I'd have been inclined to agree (it is -current, after all). But it's probably better for it to appear in /testing first, to make sure we didn't miss any bugs and also to serve as a warning shot that we'll be shaking up the tree pretty good over the next few weeks. I'd like to see this merged into the main tree in a day or two, so any testing is greatly appreciated. Switching to the PAM packages (or reverting from them) is as easy as installing all of them with upgradepkg --install-new, and if reverting then remove the three leftover _pam packages. After reverting, a bit of residue will remain in /etc/pam.d/ and /etc/security/ which can either be manually deleted or simply ignored. While there are many more features available in PAM compared with plain shadow, out of the box about the only noticable change is the use of cracklib and libpwquality to check the quality of a user-supplied password. Hopefully having PAM and krb5 will get us on track to having proper Active Directory integration as well as using code paths that are likely better audited these days. The attack surface *might* be bigger, but it's also a lot better scrutinized. Thanks to Robby Workman and Vincent Batts who did most of the initial heavy lifting on the core PAM packages as a side project for many years. Thanks also to Phantom X whose PAM related SlackBuilds were a valuable reference. And thanks as well to ivandi - I learned a lot from the SlackMATE build scripts and was even occasionally thankful for the amusing ways you would kick my ass on LQ. ;-) You're more than welcome to let us know where we've messed up this time. The binutils and glibc packages in /testing were removed and are off the table for now. I'm not seeing much upside to heading down that rabbit hole at the moment. Next we need to be looking at Xfce 4.14 and Plasma 5.18 LTS and some other things that have been held back since KDE4 couldn't use them. Cheers! :-) a/kernel-generic-5.4.19-x86_64-1.txz: Upgraded. a/kernel-huge-5.4.19-x86_64-1.txz: Upgraded. a/kernel-modules-5.4.19-x86_64-1.txz: Upgraded. a/lvm2-2.03.08-x86_64-1.txz: Upgraded. a/shadow-4.8.1-x86_64-2.txz: Rebuilt. Automatically backup /etc/login.defs and install the new version if incompatible PAM options are detected. d/kernel-headers-5.4.19-x86-1.txz: Upgraded. k/kernel-source-5.4.19-noarch-1.txz: Upgraded. VALIDATE_FS_PARSER y -> n xap/mozilla-thunderbird-68.5.0-x86_64-1.txz: Upgraded. This release contains security fixes and improvements. For more information, see: https://www.mozilla.org/en-US/thunderbird/68.5.0/releasenotes/ https://www.mozilla.org/en-US/security/advisories/mfsa2020-07/ https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-6793 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-6794 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-6795 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-6797 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-6798 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-6792 https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-6800 (* Security fix *) isolinux/initrd.img: Rebuilt. kernels/*: Upgraded. testing/packages/PAM/ConsoleKit2-1.2.1-x86_64-1_pam.txz: Added. testing/packages/PAM/at-3.2.1-x86_64-1_pam.txz: Added. testing/packages/PAM/cifs-utils-6.10-x86_64-2_pam.txz: Added. testing/packages/PAM/cracklib-2.9.7-x86_64-1_pam.txz: Added. testing/packages/PAM/cups-2.3.1-x86_64-1_pam.txz: Added. testing/packages/PAM/cyrus-sasl-2.1.27-x86_64-2_pam.txz: Added. testing/packages/PAM/dovecot-2.3.9.2-x86_64-1_pam.txz: Added. testing/packages/PAM/gnome-keyring-3.34.0-x86_64-1_pam.txz: Added. testing/packages/PAM/hplip-3.19.12-x86_64-2_pam.txz: Added. testing/packages/PAM/kde-workspace-4.11.22-x86_64-6_pam.txz: Added. testing/packages/PAM/libcap-2.31-x86_64-1_pam.txz: Added. testing/packages/PAM/libcgroup-0.41-x86_64-5_pam.txz: Added. testing/packages/PAM/libpwquality-1.4.2-x86_64-1_pam.txz: Added. testing/packages/PAM/mariadb-10.4.12-x86_64-1_pam.txz: Added. testing/packages/PAM/netatalk-3.1.12-x86_64-2_pam.txz: Added. testing/packages/PAM/netkit-rsh-0.17-x86_64-2_pam.txz: Added. testing/packages/PAM/openssh-8.1p1-x86_64-1_pam.txz: Added. testing/packages/PAM/openvpn-2.4.8-x86_64-1_pam.txz: Added. testing/packages/PAM/pam-1.3.1-x86_64-1_pam.txz: Added. testing/packages/PAM/polkit-0.116-x86_64-1_pam.txz: Added. testing/packages/PAM/popa3d-1.0.3-x86_64-3_pam.txz: Added. testing/packages/PAM/ppp-2.4.7-x86_64-3_pam.txz: Added. testing/packages/PAM/proftpd-1.3.6b-x86_64-1_pam.txz: Added. testing/packages/PAM/samba-4.11.6-x86_64-1_pam.txz: Added. testing/packages/PAM/screen-4.8.0-x86_64-1_pam.txz: Added. testing/packages/PAM/shadow-4.8.1-x86_64-2_pam.txz: Added. testing/packages/PAM/sudo-1.8.31-x86_64-1_pam.txz: Added. testing/packages/PAM/system-config-printer-1.5.12-x86_64-2_pam.txz: Added. testing/packages/PAM/util-linux-2.35.1-x86_64-1_pam.txz: Added. testing/packages/PAM/vsftpd-3.0.3-x86_64-5_pam.txz: Added. testing/packages/PAM/xdm-1.1.11-x86_64-9_pam.txz: Added. testing/packages/PAM/xlockmore-5.62-x86_64-1_pam.txz: Added. testing/packages/PAM/xscreensaver-5.43-x86_64-1_pam.txz: Added. testing/packages/binutils-2.34-x86_64-1.txz: Removed. testing/packages/glibc-2.31-x86_64-1.txz: Removed. testing/packages/glibc-i18n-2.31-x86_64-1.txz: Removed. testing/packages/glibc-profile-2.31-x86_64-1.txz: Removed. testing/packages/glibc-solibs-2.31-x86_64-1.txz: Removed. usb-and-pxe-installers/usbboot.img: Rebuilt.
Diffstat (limited to 'testing/source/PAM/a/pam/fedora-patches/pam-1.3.1-unix-checksalt_syslog.patch')
-rw-r--r--testing/source/PAM/a/pam/fedora-patches/pam-1.3.1-unix-checksalt_syslog.patch73
1 files changed, 73 insertions, 0 deletions
diff --git a/testing/source/PAM/a/pam/fedora-patches/pam-1.3.1-unix-checksalt_syslog.patch b/testing/source/PAM/a/pam/fedora-patches/pam-1.3.1-unix-checksalt_syslog.patch
new file mode 100644
index 000000000..5cbc35b03
--- /dev/null
+++ b/testing/source/PAM/a/pam/fedora-patches/pam-1.3.1-unix-checksalt_syslog.patch
@@ -0,0 +1,73 @@
+From 86eed7ca01864b9fd17099e57f10f2b9b6b568a1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
+Date: Mon, 26 Nov 2018 22:33:17 +0100
+Subject: [PATCH] pam_unix: Report unusable hashes found by checksalt to
+ syslog.
+
+libxcrypt can be build-time configured to support (or not support)
+various hashing methods. Future versions will also have support for
+runtime configuration by the system's vendor and/or administrator.
+
+For that reason adminstrator should be notified by pam if users cannot
+log into their account anymore because of such a change in the system's
+configuration of libxcrypt.
+
+Also check for malformed hashes, like descrypt hashes starting with
+"$2...", which might have been generated by unsafe base64 encoding
+functions as used in glibc <= 2.16.
+Such hashes are likely to be rejected by many recent implementations
+of libcrypt.
+
+* modules/pam_unix/passverify.c (verify_pwd_hash): Report unusable
+hashes found by checksalt to syslog.
+---
+ modules/pam_unix/passverify.c | 36 +++++++++++++++++++++++++++++++++++
+ 1 file changed, 36 insertions(+)
+
+diff --git a/modules/pam_unix/passverify.c b/modules/pam_unix/passverify.c
+index eb2444bb..2c808eb5 100644
+--- a/modules/pam_unix/passverify.c
++++ b/modules/pam_unix/passverify.c
+@@ -103,6 +103,42 @@ verify_pwd_hash(const char *p, char *hash, unsigned int nullok)
+ * Ok, we don't know the crypt algorithm, but maybe
+ * libcrypt knows about it? We should try it.
+ */
++#if defined(CRYPT_CHECKSALT_AVAILABLE) && CRYPT_CHECKSALT_AVAILABLE
++ /* Get the status of the hash from checksalt */
++ int retval_checksalt = crypt_checksalt(hash);
++
++ /*
++ * Check for hashing methods that are disabled by
++ * libcrypt configuration and/or system preset.
++ */
++ if (retval_checksalt == CRYPT_SALT_METHOD_DISABLED) {
++ /*
++ * pam_syslog() needs a pam handle,
++ * but that's not available here.
++ */
++ helper_log_err(LOG_ERR,
++ "pam_unix(verify_pwd_hash): The method "
++ "for computing the hash \"%.6s\" has been "
++ "disabled in libcrypt by the preset from "
++ "the system's vendor and/or administrator.",
++ hash);
++ }
++ /*
++ * Check for malformed hashes, like descrypt hashes
++ * starting with "$2...", which might have been
++ * generated by unsafe base64 encoding functions
++ * as used in glibc <= 2.16.
++ * Such hashes are likely to be rejected by many
++ * recent implementations of libcrypt.
++ */
++ if (retval_checksalt == CRYPT_SALT_INVALID) {
++ helper_log_err(LOG_ERR,
++ "pam_unix(verify_pwd_hash): The hash \"%.6s\""
++ "does not use a method known by the version "
++ "of libcrypt this system is supplied with.",
++ hash);
++ }
++#endif
+ #ifdef HAVE_CRYPT_R
+ struct crypt_data *cdata;
+ cdata = malloc(sizeof(*cdata));