summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Use zero-filled states for all async ops in KDCGreg Hudson2011-10-283-30/+10
| | | | | | | | | There have been a couple of uninitialized field bugs in the restructured KDC code, partly because compilers can't find these bugs as easily as they can find uninitialized local variable bugs. Use zero-filled state structures to make this type of bug less likely. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25422 dc483132-0cff-0310-8789-dd5450dbe970
* Initialize typed_e_data in as_req_stateGreg Hudson2011-10-281-0/+1
| | | | | | | | | | | | | | The typed_e_data field in struct as_req_state was not properly initialized, causing the KDC to sometimes respond with typed-data e_data for a preauth-required error when the client sends no padata. This bug was masked with recent clients, which send a KRB5_ENCPADATA_REQ_ENC_PA_REP padata. ticket: 6995 target_version: 1.10 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25419 dc483132-0cff-0310-8789-dd5450dbe970
* Fix intermediate key length in hmac-md5 checksumGreg Hudson2011-10-281-1/+1
| | | | | | | | | | | | When using hmac-md5, the intermediate key length is the output of the hash function (128 bits), not the input key length. Relevant if the input key is not an RC4 key. ticket: 6994 target_version: 1.10 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25418 dc483132-0cff-0310-8789-dd5450dbe970
* Fix format string for TRACE_INIT_CREDS_SERVICEGreg Hudson2011-10-261-1/+1
| | | | | | | | | | This should also be pulled up to 1.10. ticket: 6993 tags: pullup target_version: 1.9.2 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25417 dc483132-0cff-0310-8789-dd5450dbe970
* Make krb5_find_authdata publicGreg Hudson2011-10-2511-56/+51
| | | | | | | | | | Rename krb5int_find_authdata to krb5_find_authdata and make it public. ticket: 6992 target_version: 1.10 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25414 dc483132-0cff-0310-8789-dd5450dbe970
* Refactor salt computation into libkdb5Greg Hudson2011-10-247-204/+124
| | | | | | | Add a new API krb5_dbe_compute_salt() to determine the salt for a key data entry, and use it in the three places we currently compute salts. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25410 dc483132-0cff-0310-8789-dd5450dbe970
* Remove unneeded stuff from util directoryZhanna Tsitkov2011-10-2110-197/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25398 dc483132-0cff-0310-8789-dd5450dbe970
* fix tar invocation in mkrelTom Yu2011-10-211-4/+5
| | | | | | | | | | | | | Fix the tar invocation in mkrel so that it defaults to using "tar" as the tar program rather than "gtar". This should probably be pulled up to at least 1.9 and 1.8 as well. ticket: 6989 target_version: 1.10 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25395 dc483132-0cff-0310-8789-dd5450dbe970
* Fix handling of null edata method in KDC preauthGreg Hudson2011-10-201-1/+1
| | | | | | | | | | | | Correctly include an empty padata value if a KDC preauth system has no get_edata method. This bug prevented the KDC from indicating FAST support in preauth-required errors. ticket: 6988 target_version: 1.10 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25385 dc483132-0cff-0310-8789-dd5450dbe970
* Fix krb5_cc_set_configGreg Hudson2011-10-201-8/+6
| | | | | | | | | | | | | | | krb5_cc_set_config has been non-functional since r24753 on cache types which don't support removal of credential entries. Fix it by only calling krb5_cc_remove_cred if data is NULL, since krb5_cc_store_cred will do it anyway in the positive case. Also fix an old memory leak in an uncommon error case. ticket: 6987 target_version: 1.10 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25384 dc483132-0cff-0310-8789-dd5450dbe970
* SA-2011-006 KDC denial of service [CVE-2011-1527 CVE-2011-1528 CVE-2011-1529]Tom Yu2011-10-183-2/+25
| | | | | | | | | | | Fix null pointer dereference and assertion failure conditions that could cause a denial of service. ticket: 6981 target_version: 1.10 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25368 dc483132-0cff-0310-8789-dd5450dbe970
* Ensure termination in Windows vsnprintf wrapperGreg Hudson2011-10-181-1/+3
| | | | | | | | | | | | | | | The Windows _vsnprintf does not terminate its output buffer in the overflow case. Make sure we do that in the wrapper. Reported by Chris Hecker. (Not an issue for KfW 3.2 since we weren't using snprintf in 1.6.x except in Unix-specific code.) ticket: 6980 target_version: 1.10 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25367 dc483132-0cff-0310-8789-dd5450dbe970
* Delete Network Identity ManagerTom Yu2011-10-17436-101374/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25363 dc483132-0cff-0310-8789-dd5450dbe970
* Make reindentTom Yu2011-10-1737-538/+546
| | | | | | | Also fix pkinit_crypto_nss.c struct initializers and add parens to a ternary operator in do_as_req.c for better indentation. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25362 dc483132-0cff-0310-8789-dd5450dbe970
* Exclude util/wshelper from reindentTom Yu2011-10-171-1/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25361 dc483132-0cff-0310-8789-dd5450dbe970
* Add AC_LANG_SOURCE to PKINIT NSS version checkGreg Hudson2011-10-171-2/+2
| | | | | | | | The configure.in code for the PKINIT NSS back end version check was copied from the k5crypto NSS back end version check, but from before r25181 which added AC_LANG_SOURCE wrappers. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25360 dc483132-0cff-0310-8789-dd5450dbe970
* Style policeGreg Hudson2011-10-171-2/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25359 dc483132-0cff-0310-8789-dd5450dbe970
* gssalloc-related fixes to naming_exts.cSam Hartman2011-10-171-28/+31
| | | | | | | | | | | | | renamed kg_data_list_to_buffer_set_nocopy to data_list_buffer_set (since nocopy is no longer guaranteed). removed extra indirection to input krb5_data list. ensured input krb5_data list is always completely freed. no longer returns EINVAL when output buffer set is NULL. fixed krb5_gss_get_name_attribute to use data_to_gss. Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com> git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25358 dc483132-0cff-0310-8789-dd5450dbe970
* RFC 4120 says that we should not canonicalize using DNS. We cannot getSam Hartman2011-10-171-4/+3
| | | | | | | | | | | | | | that far today, but there's no reason we should fail to use a perfectly good principal name just because DNS is failing. For some services there isn't even a requirement they be in DNS. With AI_ADDRCONFIG there's no reason that Kerberos canonicalization should fail simply because a v6 address is not present, for example. So, if getaddrinfo fails in krb5_sname_to_principal simply use the input hostname uncanonicalized. sn2princ: On getaddrinfo failure use the input git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25357 dc483132-0cff-0310-8789-dd5450dbe970
* Allow password changes over NATsGreg Hudson2011-10-151-23/+8
| | | | | | | | | | | | In the kpasswd server code, don't set a remote address in the auth context before calling krb5_rd_priv, since the kpasswd protocol is well-protected against reflection attacks. This allows password changes to work in cases where a NAT has changed the client IP address as it is seen by the server. ticket: 6979 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25356 dc483132-0cff-0310-8789-dd5450dbe970
* Allow rd_priv/rd_safe without remote addressGreg Hudson2011-10-153-12/+18
| | | | | | | | | | | | | | Allow krb5_rd_priv and krb5_rd_safe to work when there is no remote address set in the auth context, unless the KRB5_AUTH_CONTEXT_DO_TIMES flag is set (in which case we need the remote address for the replay cache name). Note that failing to set the remote address can create a vulnerability to reflection attacks in some protocols, although it is fairly easy to defend against--either use sequence numbers, or make sure that requests don't look like replies, or both. ticket: 6978 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25355 dc483132-0cff-0310-8789-dd5450dbe970
* Update mit-krb5.potGreg Hudson2011-10-151-927/+1655
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25354 dc483132-0cff-0310-8789-dd5450dbe970
* Install krb5/preauth_plugin.hGreg Hudson2011-10-151-0/+1
| | | | | | | | | | The clpreauth and kdcpreauth pluggable interfaces are public as of krb5 1.10. Install the header so that preauth modules can be built outside of the krb5 source tree. ticket: 6977 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25353 dc483132-0cff-0310-8789-dd5450dbe970
* Rename PAC type constants to avoid conflictsGreg Hudson2011-10-153-36/+53
| | | | | | | | Since the PAC type constants are now exposed in krb5.h, give them a KRB5_ prefix so they don't conflict with similar PAC type constants in other packages, like Samba. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25352 dc483132-0cff-0310-8789-dd5450dbe970
* Hide gak_fct interface and arguments in clpreauthGreg Hudson2011-10-159-187/+127
| | | | | | | | | | | | | | | | | | | | | | Remove the gak_fct, gak_data, salt, s2kparams, and as_key arguments of krb5_clpreauth_process_fn and krb5_clpreauth_tryagain_fn. To replace them, add two callbacks: one which gets the AS key using the previously selected etype-info2 information, and a second which lets the module replace the AS key with one it has computed. This changes limits module flexibility in a few ways. Modules cannot check whether the AS key was already obtained before asking for it, and they cannot use the etype-info2 salt and s2kparams for purposes other than getting the password-based AS key. It is believed that of existing preauth mechanisms, only SAM-2 preauth needs more flexibility than the new interfaces provide, and as an internal legacy mechanism it can cheat. Future mechanisms should be okay since the current IETF philosophy is that etype-info2 information should not be used for other purposes. ticket: 6976 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25351 dc483132-0cff-0310-8789-dd5450dbe970
* Drop retransmits while processing requestsGreg Hudson2011-10-153-7/+46
| | | | | | | | Supporting asynchronous preauth modules means that the KDC can receive a retransmitted request before it finishes processing the initial request. Ignore those retransmits instead of processing them. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25350 dc483132-0cff-0310-8789-dd5450dbe970
* Untabify kdc_preauth_encts.cGreg Hudson2011-10-151-5/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25349 dc483132-0cff-0310-8789-dd5450dbe970
* Make kdcpreauth edata method respond via callbackGreg Hudson2011-10-157-123/+218
| | | | | | From npmccallum@redhat.com with changes. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25348 dc483132-0cff-0310-8789-dd5450dbe970
* Make get_preauth_hint_list respond via callbackGreg Hudson2011-10-153-29/+48
| | | | | | From npmccallum@redhat.com with changes. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25347 dc483132-0cff-0310-8789-dd5450dbe970
* Remove enc-timestamp code from kdc_preauth.cGreg Hudson2011-10-151-124/+0
| | | | | | This code should have been removed in r25319 but was not. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25346 dc483132-0cff-0310-8789-dd5450dbe970
* Exclude more stuff from make reindentTom Yu2011-10-141-4/+9
| | | | | | | Apply exclusions to "make reindent" as well, to fully exclude some files from whitespace cleanups. Add fnmatch.c to exclusions. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25345 dc483132-0cff-0310-8789-dd5450dbe970
* make dependTom Yu2011-10-1410-582/+635
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25344 dc483132-0cff-0310-8789-dd5450dbe970
* Untabify a recent gssapi_alloc.h changeGreg Hudson2011-10-141-1/+2
| | | | | | Also mark the file as using the krb5 C style. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25343 dc483132-0cff-0310-8789-dd5450dbe970
* Fix gssapi_strdupSam Hartman2011-10-141-7/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25342 dc483132-0cff-0310-8789-dd5450dbe970
* gssalloc memory management for gss_buffer_setSam Hartman2011-10-143-9/+26
| | | | | | | | compiles, but untested Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com> git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25341 dc483132-0cff-0310-8789-dd5450dbe970
* build profile dll (xpprof32/64.dll) on windowsSam Hartman2011-10-141-1/+1
| | | | | | Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com> git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25340 dc483132-0cff-0310-8789-dd5450dbe970
* Further attempt at removing K4 specific code from the leash executableSam Hartman2011-10-1418-39/+329
| | | | | | | | | | | | | | | | Updates to leash Makefile.in to make it link on Windows 64 Signed-off-by: Alexey Melnikov <aamelnikov@gmail.com> leash link fixes: fix mfc library and fix path to wshelper MFC100D.lib for mscv2010; util\wshelper instead of windows\wshelper Add ver.rc for leash Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com> git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25339 dc483132-0cff-0310-8789-dd5450dbe970
* Fixed some warnings and Windows 64 portability issues in the leash executableSam Hartman2011-10-146-20/+22
| | | | | | Signed-off-by: Alexey Melnikov <aamelnikov@gmail.com> git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25338 dc483132-0cff-0310-8789-dd5450dbe970
* Fixed some warnings in libwinSam Hartman2011-10-143-10/+10
| | | | | | Signed-off-by: Alexey Melnikov <aamelnikov@gmail.com> git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25337 dc483132-0cff-0310-8789-dd5450dbe970
* Updated resource file dependencies for leashdllSam Hartman2011-10-141-1/+1
| | | | | | Signed-off-by: Alexey Melnikov <aamelnikov@gmail.com> git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25336 dc483132-0cff-0310-8789-dd5450dbe970
* re-remove windows/gss from windows buildSam Hartman2011-10-141-4/+2
| | | | | | Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com> git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25335 dc483132-0cff-0310-8789-dd5450dbe970
* Fix windows fork detectionSam Hartman2011-10-141-6/+10
| | | | | | Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com> git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25334 dc483132-0cff-0310-8789-dd5450dbe970
* Add "-dce" commandline option to gss-client.c to set GSS_C_DCE_STYLE flagSam Hartman2011-10-143-1/+9
| | | | | | Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com> git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25333 dc483132-0cff-0310-8789-dd5450dbe970
* Use gssalloc memory management where appropriateSam Hartman2011-10-1417-106/+112
| | | | | | | | | | gss_buffer_t may be freed in a different module from where they are allocated so it is not safe to use strdup/malloc/calloc/free. similarly, gss_OID_set need to use gssalloc functions. Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com> git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25332 dc483132-0cff-0310-8789-dd5450dbe970
* Utility functions to move allocations from k5buf/krb5_data to gss_buffer_tSam Hartman2011-10-142-1/+66
| | | | | | | | | | | | On Unix, these simply move the buffer pointer, but on windows they need to reallocated with gssalloc_malloc and coied since the gss_buffer_t may need to be freed in a separate module with potentially mismatched c runtime. Also fix a mismatched parameter warning in generic_gss_copy_oid_set(). Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com> git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25331 dc483132-0cff-0310-8789-dd5450dbe970
* Add new header gssapi_alloc.hSam Hartman2011-10-147-4/+74
| | | | | | | | | | | | | | | Contains allocator methods for use with mechanisms and mechglues for allocations that must be made in one module but freed in another. On windows, an allocation made in one module cannot safely be freed in another using the usual c runtime malloc/free; runtime dll mismatch will cause heap corruption in that case. But it is safe to instead directly use HeapAlloc()/HeapFree() specifying the default process heap. For now, this header is not public. If it becomes public strncpy will need to be used instead of strlcpy. Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com> git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25330 dc483132-0cff-0310-8789-dd5450dbe970
* Simplify gss_indicate_mechs() by using generic_gss_copy_oid_setSam Hartman2011-10-141-52/+3
| | | | | | | | | ...instead of hand-duplicating all the logic therein. Also makes the switch to using gssalloc functions with oid_sets easier. Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com> git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25329 dc483132-0cff-0310-8789-dd5450dbe970
* Removed unused macrosZhanna Tsitkov2011-10-143-13/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25328 dc483132-0cff-0310-8789-dd5450dbe970
* Add PKINIT NSS supportGreg Hudson2011-10-137-5/+5370
| | | | | | | | | Add an implementation of PKINIT using NSS instead of OpenSSL, from nalin@redhat.com. ticket: 6975 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25327 dc483132-0cff-0310-8789-dd5450dbe970
* Fix the doxygen comments for krb5_pac_signZhanna Tsitkov2011-10-121-6/+6
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25326 dc483132-0cff-0310-8789-dd5450dbe970