Fix kpasswd UDP ping-pong [CVE-2002-2443]

The kpasswd service provided by kadmind was vulnerable to a UDP
"ping-pong" attack [CVE-2002-2443].  Don't respond to packets unless
they pass some basic validation, and don't respond to our own error
packets.

Some authors use CVE-1999-0103 to refer to the kpasswd UDP ping-pong
attack or UDP ping-pong attacks in general, but there is discussion
leading toward narrowing the definition of CVE-1999-0103 to the echo,
chargen, or other similar built-in inetd services.

Thanks to Vincent Danen for alerting us to this issue.

CVSSv2: AV:N/AC:L/Au:N/C:N/I:N/A:P/E:P/RL:O/RC:C

(cherry picked from commit cf1a0c411b2668c57c41e9c4efd15ba17b6b322c)

ticket: 7637
version_fixed: 1.11.3
status: resolved
Rename internal Camellia symbols

Symbols from the NTT Camellia sources, used in the builtin crypto
provider, could conflict with symbols from other libraries such as
OpenSSL's libcrypto.  Rename those like we rename the Gladman AES
symbols.

(cherry picked from commit 19c9cc879c6fdc9420d3d9e9fb3affbb692668b9)

ticket: 7626
version_fixed: 1.11.3
status: resolved
Clean up python bytecode from doc build

Otherwise they escape into the release tarball.

(cherry picked from commit 424bed7b2943e0bc32a3feab4c55a4ea056bfa21)

ticket: 7644
version_fixed: 1.11.3
status: resolved
Clarify that kdc.conf and krb5.conf are merged

These two files are merged into the profile for KDC applications

(cherry picked from commit e818d27a372d021bc6025e7bce867ed06a8fc1ad)

ticket: 7460
version_fixed: 1.11.3
status: resolved
Fix transited handling for GSSAPI acceptors

The Acceptor Names project (#6855) extended krb5_rd_req so that it can
accept a "matching principal" in the server parameter.  If the
matching principal has an empty realm, rd_req_decoded_opt attempted to
do transited checking with an empty server realm.

To fix this, always reset server to req->ticket->server for future
processing steps if we decrypt the ticket using a keytab.
decrypt_ticket replaces req->ticket->server with the principal name
from the keytab entry, so we know this name is correct.

Based on a bug report and patch from nalin@redhat.com.

(cherry picked from commit 57acee11b5c6682a7f4f036e35d8b2fc9292875e)

ticket: 7639
version_fixed: 1.11.3
status: resolved
Clarify krb5_rd_req documentation

For the user-to-user case, document that callers should pass a server
principal to krb5_rd_req.  For the keytab case, more accurately
document which keytab keys are tried against the ticket.

(cherry picked from commit 98aa233e18245981b491affe5fa70623cb83b705)

ticket: 7641
version_fixed: 1.11.3
status: resolved
Document preauth flags for service principals

These flags are overloaded to mean different things for clients and
servers; previously we only documented the client behavior.

(cherry picked from commit 7425e9b69566c241c54eb2686fb37f216122423f)

ticket: 7653
version_fixed: 1.11.3
status: resolved
Clarify retiring-des based on user feedback

Explain why DES keys should be removed from principals, and clarify
that allow_weak_crypto overrides all other configuration.

(cherry picked from commit fa6de1bf73926751a2f68bff31ef020eb7db9260)

ticket: 7654
version_fixed: 1.11.3
status: resolved
Clean up dangling antecedent in allow_weak_crypto

The "previous three lists" are not previous any more.
Say explicitly which three lists, and make the parenthetical bind
to the correct noun.

(cherry picked from commit 2a10e19e19c65af0e3890bdeae03c37089ef02ea)

ticket: 7655
version_fixed: 1.11.3
status: resolved
Updates for krb5-1.11.3
Update for krb5-1.11.3-postrelease
Check for keys in encrypted timestamp/challenge

Encrypted timestamp and encrypted challenge cannot succeed if the
client has no long-term key matching the request enctypes, so do not
offer them in that case.

ticket: 7630

NPM - This is a backport from the upstream fix. See upstream commits:
  https://github.com/krb5/krb5/commit/e50482720a805ecd8c160e4a8f4a846e6327dca2
  https://github.com/krb5/krb5/commit/9593d1311fa5e6e841c429653ad35a63d17c2fdd
Don't send empty etype info from KDC

RFC 4120 prohibits empty ETYPE-INFO2 sequences (though not ETYPE-INFO
sequences), and our client errors out if it sees an empty sequence of
either.

ticket: 7630
Make AS requests work with no client key

If we cannot find a client key while preparing an AS reply, give
preauth mechanisms a chance to replace the reply key before erroring
out.

ticket: 7630