aboutsummaryrefslogtreecommitdiff
path: root/crypto/heimdal/lib/roken
Commit message (Collapse)AuthorAgeFilesLines
* heimdal: don't try to expose nonexistant symbolsBrooks Davis2024-03-071-65/+0
| | | | | | | | | | | | For one reason or another these symbols aren't present so don't try to make them available for linkage. In the case of libroken these seem to be compatability bits we don't need a thus don't compile. For others it seems to rot upstream, but I've not investigated deeply. Reviewed by: cy Differential Revision: https://reviews.freebsd.org/D44246
* kerberos: Fix numerous segfaults when using weak cryptoCy Schubert2024-01-181-0/+1
| | | | | | | | | | | | | | | | | | | | Weak crypto is provided by the openssl legacy provider which is not load by default. Load the legacy providers as needed. When the legacy provider is loaded into the default context the default provider will no longer be automatically loaded. Without the default provider the various kerberos applicaions and functions will abort(). This is the second attempt at this patch. Instead of linking secure/lib/libcrypto at build time we now link it at runtime, avoiding buildworld failures under Linux and MacOS. This is because TARGET_ENDIANNESS is undefined at pre-build time. PR: 272835 MFC after: 3 days X-MFC: only to stable/14 Tested by: netchild Joerg Pulz <Joerg.Pulz@frm2.tum.de> (previous version)
* Revert "kerberos: Fix numerous segfaults when using weak crypto"Cy Schubert2024-01-121-1/+0
| | | | | | | | | | | | | | | | This revision breaks Linux and MacOS cross builds because TARGET_ENDIANNESS is not define during bootstrapping on these platforms. I think the correct approach would be to separate the new fbsd_ossl_provider_load() and unload functions into their own library (instead of libroken). This avoids the less desirable option of including bsd.cpu.mk in secure/lib/Makefile.common, which does build but could complicate future work. Reported by: jrtc27 This reverts commit cb350ba7bf7ca7c4cb97ed2c20ab45af60382cfb.
* kerberos: Fix numerous segfaults when using weak cryptoCy Schubert2024-01-111-0/+1
| | | | | | | | | | | | | | Weak crypto is provided by the openssl legacy provider which is not load by default. Load the legacy providers as needed. When the legacy provider is loaded into the default context the default provider will no longer be automatically loaded. Without the default provider the various kerberos applicaions and functions will abort(). PR: 272835 MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D43009 Tested by: netchild, Joerg Pulz <Joerg.Pulz@frm2.tum.de>
* heimdal: Fix man page and documentation typosCy Schubert2024-01-041-2/+2
| | | | | Reported by: Jens Schweikhardt <schweikh@schweikhardt.net> MFC: 1 week
* heimdal: Fix multiple security vulnerabilitiesCy Schubert2022-11-151-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following issues are patched: - CVE-2022-42898 PAC parse integer overflows - CVE-2022-3437 Overflows and non-constant time leaks in DES{,3} and arcfour - CVE-2021-44758 NULL dereference DoS in SPNEGO acceptors - CVE-2022-44640 Heimdal KDC: invalid free in ASN.1 codec Note that CVE-2022-44640 is a severe vulnerability, possibly a 10.0 on the Common Vulnerability Scoring System (CVSS) v3, as we believe it should be possible to get an RCE on a KDC, which means that credentials can be compromised that can be used to impersonate anyone in a realm or forest of realms. Heimdal's ASN.1 compiler generates code that allows specially crafted DER encodings of CHOICEs to invoke the wrong free function on the decoded structure upon decode error. This is known to impact the Heimdal KDC, leading to an invalid free() of an address partly or wholly under the control of the attacker, in turn leading to a potential remote code execution (RCE) vulnerability. This error affects the DER codec for all extensible CHOICE types used in Heimdal, though not all cases will be exploitable. We have not completed a thorough analysis of all the Heimdal components affected, thus the Kerberos client, the X.509 library, and other parts, may be affected as well. This bug has been in Heimdal's ASN.1 compiler since 2005, but it may only affect Heimdal 1.6 and up. It was first reported by Douglas Bagnall, though it had been found independently by the Heimdal maintainers via fuzzing a few weeks earlier. While no zero-day exploit is known, such an exploit will likely be available soon after public disclosure. - CVE-2019-14870: Validate client attributes in protocol-transition - CVE-2019-14870: Apply forwardable policy in protocol-transition - CVE-2019-14870: Always lookup impersonate client in DB Sponsored by: so (philip) Obtained from: so (philip) Tested by: philip, cy MFC after: immediately
* Update the existing heimdal implementation for OpenSSL 1.1.John Baldwin2018-10-051-1/+1
| | | | | | | | | | | | | | | | | | | | Existing work is underway to import a newer version of heimdal, but this patchset gets us to a fully working tree to enable more wide spread testing of OpenSSL 1.1 for now. I've also enabled WARNS=1 for kerberos (which is the reason for the change in libroken). Having -Werror enabled was useful during the 1.1 updates and we probably should have warnings enabled by default for kerberos anyway. This passes make tinderbox, and I have also done some very light runtime testing on amd64. Reviewed by: bjk, jkim, emaste Differential Revision: https://reviews.freebsd.org/D17276 Notes: svn path=/projects/openssl111/; revision=339198
* Update userland arc4random() with OpenBSD's Chacha20 based arc4random().Xin LI2018-08-191-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ObsoleteFiles.inc: Remove manual pages for arc4random_addrandom(3) and arc4random_stir(3). contrib/ntp/lib/isc/random.c: contrib/ntp/sntp/libevent/evutil_rand.c: Eliminate in-tree usage of arc4random_addrandom(). crypto/heimdal/lib/roken/rand.c: crypto/openssh/config.h: Eliminate in-tree usage of arc4random_stir(). include/stdlib.h: Remove arc4random_stir() and arc4random_addrandom() prototypes, provide temporary shims for transistion period. lib/libc/gen/Makefile.inc: Hook arc4random-compat.c to build, add hint for Chacha20 source for kernel, and remove arc4random_addrandom(3) and arc4random_stir(3) links. lib/libc/gen/arc4random.c: Adopt OpenBSD arc4random.c,v 1.54 with bare minimum changes, use the sys/crypto/chacha20 implementation of keystream. lib/libc/gen/Symbol.map: Remove arc4random_stir and arc4random_addrandom interfaces. lib/libc/gen/arc4random.h: Adopt OpenBSD arc4random.h,v 1.4 but provide _ARC4_LOCK of our own. lib/libc/gen/arc4random.3: Adopt OpenBSD arc4random.3,v 1.35 but keep FreeBSD r114444 and r118247. lib/libc/gen/arc4random-compat.c: Compatibility shims for arc4random_stir and arc4random_addrandom functions to preserve ABI. Log once when called but do nothing otherwise. lib/libc/gen/getentropy.c: lib/libc/include/libc_private.h: Fold __arc4_sysctl into getentropy.c (renamed to arnd_sysctl). Remove from libc_private.h as a result. sys/crypto/chacha20/chacha.c: sys/crypto/chacha20/chacha.h: Make it possible to use the kernel implementation in libc. PR: 182610 Reviewed by: cem, markm Obtained from: OpenBSD Relnotes: yes Differential Revision: https://reviews.freebsd.org/D16760 Notes: svn path=/head/; revision=338059
* Renumber copyright clause 4Warner Losh2017-02-281-1/+1
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* Remove duplicate symbols from libroken version-script.mapEd Maste2016-07-211-6/+0
| | | | | | | | | Upstream commit r24759 (efed563) prefixed some symbols with rk_, but introduced 6 duplicate symbols in the version script (because the rk_-prefixed versions of the symbols were already present). Notes: svn path=/head/; revision=303156
* - Update FreeBSD Heimdal distribution to version 1.5.1. This also bringsStanislav Sedov2012-03-22176-4017/+7113
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | several new kerberos related libraries and applications to FreeBSD: o kgetcred(1) allows one to manually get a ticket for a particular service. o kf(1) securily forwards ticket to another host through an authenticated and encrypted stream. o kcc(1) is an umbrella program around klist(1), kswitch(1), kgetcred(1) and other user kerberos operations. klist and kswitch are just symlinks to kcc(1) now. o kswitch(1) allows you to easily switch between kerberos credentials if you're running KCM. o hxtool(1) is a certificate management tool to use with PKINIT. o string2key(1) maps a password into key. o kdigest(8) is a userland tool to access the KDC's digest interface. o kimpersonate(8) creates a "fake" ticket for a service. We also now install manpages for some lirbaries that were not installed before, libheimntlm and libhx509. - The new HEIMDAL version no longer supports Kerberos 4. All users are recommended to switch to Kerberos 5. - Weak ciphers are now disabled by default. To enable DES support (used by telnet(8)), use "allow_weak_crypto" option in krb5.conf. - libtelnet, pam_ksu and pam_krb5 are now compiled with error on warnings disabled due to the function they use (krb5_get_err_text(3)) being deprecated. I plan to work on this next. - Heimdal's KDC now require sqlite to operate. We use the bundled version and install it as libheimsqlite. If some other FreeBSD components will require it in the future we can rename it to libbsdsqlite and use for these components as well. - This is not a latest Heimdal version, the new one was released while I was working on the update. I will update it to 1.5.2 soon, as it fixes some important bugs and security issues. Notes: svn path=/head/; revision=233294
| * - Flatten the vendor heimdal tree.Stanislav Sedov2011-09-29172-28718/+0
| | | | | | | | Notes: svn path=/vendor-crypto/heimdal/dist/; revision=225864
* | Fix conflicts after heimdal-1.1 import and add build infrastructure. ImportDoug Rabson2008-05-074-138/+0
|/ | | | | | | all non-style changes made by heimdal to our own libgssapi. Notes: svn path=/head/; revision=178828
* Vendor import of Heimdal 1.1Doug Rabson2008-05-07165-1919/+7874
| | | | Notes: svn path=/vendor-crypto/heimdal/dist/; revision=178825
* Vendor import of Heimdal 0.6.3.vendor/heimdal/0.6.3Jacques Vidrine2005-02-241-219/+230
| | | | | Notes: svn path=/vendor-crypto/heimdal/dist/; revision=142403 svn path=/vendor-crypto/heimdal/0.6.3/; revision=142405; tag=vendor/heimdal/0.6.3
* Clean up the Heimdal vendor branch by removing files not included inJacques Vidrine2005-02-2473-3102/+0
| | | | | | | | | | | any import for several years. If memory serves, this was Suggested by: ru an awfully long time ago-- sorry for the delay! Notes: svn path=/vendor-crypto/heimdal/dist/; revision=142400
* Vendor import of Heimdal 0.6.1.Jacques Vidrine2004-04-036-271/+331
| | | | Notes: svn path=/vendor-crypto/heimdal/dist/; revision=127808
* Vendor import of Heimdal 0.6.Jacques Vidrine2003-10-0916-53/+144
| | | | Notes: svn path=/vendor-crypto/heimdal/dist/; revision=120945
* Import of Heimdal 0.5.1.Jacques Vidrine2002-11-244-230/+247
| | | | | | | Approved by: re Notes: svn path=/vendor-crypto/heimdal/dist/; revision=107207
* Import of Heimdal Kerberos from KTH repository circa 2002/09/16.Jacques Vidrine2002-09-1610-29/+1045
| | | | Notes: svn path=/vendor-crypto/heimdal/dist/; revision=103423
* Import of Heimdal Kerberos from KTH repository circa 2002/08/29.Jacques Vidrine2002-08-3084-313/+3101
| | | | Notes: svn path=/vendor-crypto/heimdal/dist/; revision=102644
* Import of Heimdal Kerberos from KTH repository circa 2002/02/17.Jacques Vidrine2002-02-1942-759/+2341
| | | | Notes: svn path=/vendor-crypto/heimdal/dist/; revision=90926
* import of heimdal 0.3fAssar Westerlund2001-06-2120-85/+335
| | | | Notes: svn path=/vendor-crypto/heimdal/dist/; revision=78527
* import of heimdal 0.3eAssar Westerlund2001-02-1354-758/+3731
| | | | Notes: svn path=/vendor-crypto/heimdal/dist/; revision=72445
* Vendor import of Heimdal 0.2pvendor/heimdal/0.2pMark Murray2000-02-244-7/+20
| | | | | Notes: svn path=/vendor-crypto/heimdal/dist/; revision=57422 svn path=/vendor-crypto/heimdal/0.2p/; revision=57424; tag=vendor/heimdal/0.2p
* Vendor import of Heimdal 0.2ovendor/heimdal/0.2oMark Murray2000-02-247-18/+125
| | | | | Notes: svn path=/vendor-crypto/heimdal/dist/; revision=57419 svn path=/vendor-crypto/heimdal/0.2o/; revision=57421; tag=vendor/heimdal/0.2o
* Vendor import of Heimdal 0.2nvendor/heimdal/0.2nMark Murray2000-02-249-51/+173
| | | | | Notes: svn path=/vendor-crypto/heimdal/dist/; revision=57416 svn path=/vendor-crypto/heimdal/0.2n/; revision=57418; tag=vendor/heimdal/0.2n
* Import KTH Heimdal, which will be the core of our Kerberos5.vendor/heimdal/0.2mMark Murray2000-01-09125-0/+16835
Userland to follow. Notes: svn path=/vendor-crypto/heimdal/dist/; revision=55682 svn path=/vendor-crypto/heimdal/0.2m/; revision=55684; tag=vendor/heimdal/0.2m