openafs/src
Andrew Deason 05217c2917 rx: Ignore responses to nonexistent challenges
Consider the following situation:

 - A client sends a data packet to a server, using a security class
   that requires a challenge
 - The server responds with a challenge
 - The server is restarted
 - The client responds to the challenge with a response

In that situation, the server will process the response, but since the
server was restarted, it has no knowledge of the challenge that was
sent. This generally means that we error the connection, since the
given response is not valid. For rxkad with modern endpoints, this
results in an RXKADPACKETSHORT error, since we interpret the response
as an 'old' response, but it's actually a 'v2' response, so we
interpret the fields in the response as garbage.

This means that the client gets a connection error when the client did
nothing wrong, and there's no way for the client to distinguish this
from a real connection error.

One way to solve this would be to send a Challenge packet to the
client immediately when we detect that this situation has occurred.
However, if we do that, then we never see a data packet with a
checksum, so we fall back to using "old" challenges and responses. And
in general, that would cause the server side to never see a data
packet during the connection negotiation, which is unusual and I am
concerned there may be other niggles of odd behavior that may occur in
that scenario.

So instead, to fix this, make the server ignore responses in this
situation (that is, if we haven't sent out any challenges yet).
Clients will eventually resend the data packet, and we will go through
negotiating the connection security like normal. This should never
cause any new problems, since dropping a challenge packet must be
handled anyway (sometimes packets just get dropped). And a client will
never hang on sending the same response over and over again; clients
only ever send a Response in response to a Challenge packet.

Change-Id: Id3fae425addb2ac8ab60965213b3ebca2e64ba5d
Reviewed-on: http://gerrit.openafs.org/10315
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
2015-01-04 21:39:18 -05:00
..
afs Unix CM: Avoid using stale DV in afs_StoreAllSegments 2014-12-26 12:00:31 -05:00
afsd Fix unchecked calls to asprintf 2014-12-01 11:27:15 -05:00
afsinstall doc: remove references to AFS's NTP daemon 2012-03-20 20:59:27 -07:00
afsmonitor cmd: add flags argument to create syntax function 2014-11-24 21:09:52 -05:00
afsweb Fix unchecked calls to asprintf 2014-12-01 11:27:15 -05:00
aklog Fix unchecked calls to asprintf 2014-12-01 11:27:15 -05:00
audit Fix unchecked calls to asprintf 2014-12-01 11:27:15 -05:00
auth auth: Clean up and document functions in netrestrict.c 2014-12-03 01:06:11 -05:00
bozo Fix unchecked calls to asprintf 2014-12-01 11:27:15 -05:00
bu_utils cmd: add flags argument to create syntax function 2014-11-24 21:09:52 -05:00
bubasics build: remove trailing whitespace from makefiles 2014-10-08 10:46:57 -04:00
bucoord Make all VLDB interactions use VLF/VLSF names 2014-12-04 18:43:08 -05:00
budb budb: Avoid use of anonymous structures to determine size 2014-12-06 19:55:40 -05:00
butc Make all VLDB interactions use VLF/VLSF names 2014-12-04 18:43:08 -05:00
butm build: remove trailing whitespace from makefiles 2014-10-08 10:46:57 -04:00
cf Linux 3.18: d_invalidate can no longer return an error 2014-10-31 08:37:48 -04:00
cmd Fix unchecked calls to asprintf 2014-12-01 11:27:15 -05:00
comerr Normalize names of libtool convenience libraries 2014-10-08 10:47:55 -04:00
config afs: Remove AFS_BOZONLOCK_ENV 2014-12-07 12:26:13 -05:00
crypto Clean up our cleaning 2014-11-28 18:04:15 -05:00
dir build: remove trailing whitespace from makefiles 2014-10-08 10:46:57 -04:00
dviced build: remove trailing whitespace from makefiles 2014-10-08 10:46:57 -04:00
dvolser build: remove trailing whitespace from makefiles 2014-10-08 10:46:57 -04:00
export build: remove trailing whitespace from makefiles 2014-10-08 10:46:57 -04:00
external Import of code from heimdal 2014-11-05 08:23:38 -05:00
finale build: remove trailing whitespace from makefiles 2014-10-08 10:46:57 -04:00
fsint (Partially) unify XDR for libuafs and libafs 2014-11-05 08:35:47 -05:00
fsprobe build: remove trailing whitespace from makefiles 2014-10-08 10:46:57 -04:00
gtx cmd: add flags argument to create syntax function 2014-11-24 21:09:52 -05:00
JAVA Finish deorbiting libjuafs.a 2014-11-05 08:37:51 -05:00
kauth kauth: fix klog principal name parsing 2014-12-03 01:10:33 -05:00
kopenafs Build kopenafs with libtool 2014-10-15 10:52:52 -04:00
libacl build: remove trailing whitespace from makefiles 2014-10-08 10:46:57 -04:00
libadmin Make all VLDB interactions use VLF/VLSF names 2014-12-04 18:43:08 -05:00
libafs (Partially) unify XDR for libuafs and libafs 2014-11-05 08:35:47 -05:00
libafsauthent Build and install libafsauthent.so.2 2014-10-08 10:49:49 -04:00
libafscp Allow building with MIT krb5 and external roken 2014-10-08 10:52:14 -04:00
libafsrpc Build and install libafsrpc.so.2 2014-10-08 10:49:36 -04:00
libuafs Finish deorbiting libjuafs.a 2014-11-05 08:37:51 -05:00
log cmd: add flags argument to create syntax function 2014-11-24 21:09:52 -05:00
lwp Stylistic tweak lwp/process.o machinery 2014-11-05 08:40:05 -05:00
mcas afs: removing trailing semicolons 2013-02-26 13:55:22 -08:00
opr Sort libtool symbol files 2014-09-10 15:24:56 -04:00
packaging RedHat: Update configure options, again 2015-01-04 21:26:25 -05:00
pam Make pam conditional on INSTALL_KAUTH 2014-10-08 10:50:17 -04:00
platform Fix unchecked calls to asprintf 2014-12-01 11:27:15 -05:00
procmgmt build: remove trailing whitespace from makefiles 2014-10-08 10:46:57 -04:00
ptserver Remove UKERNEL code from files that don't need it 2014-12-01 18:23:51 -05:00
roken Build roken using libtool 2014-10-08 10:52:53 -04:00
rx rx: Ignore responses to nonexistent challenges 2015-01-04 21:39:18 -05:00
rxdebug cmd: add flags argument to create syntax function 2014-11-24 21:09:52 -05:00
rxgen rxgen: Only cast array/pointer/vector types 2014-12-17 10:51:53 -05:00
rxgk Normalize names of libtool convenience libraries 2014-10-08 10:47:55 -04:00
rxkad cmd: add flags argument to create syntax function 2014-11-24 21:09:52 -05:00
rxosd build: remove trailing whitespace from makefiles 2014-10-08 10:46:57 -04:00
rxstat Normalize names of libtool convenience libraries 2014-10-08 10:47:55 -04:00
scout cmd: add flags argument to create syntax function 2014-11-24 21:09:52 -05:00
sgistuff build: remove trailing whitespace from makefiles 2014-10-08 10:46:57 -04:00
shlibafsrpc libafsrpc: Assemble with libtool 2012-09-09 20:14:11 -07:00
sys Fix unchecked calls to asprintf 2014-12-01 11:27:15 -05:00
tbudb build: separate source and header compile_et rules 2014-05-28 10:25:22 -04:00
tbutc Use rfc3961 library to decrypt kerberos 5 tickets 2013-07-13 10:32:21 +01:00
tests Fix unchecked calls to asprintf 2014-12-01 11:27:15 -05:00
tools build: remove trailing whitespace from makefiles 2014-10-08 10:46:57 -04:00
tptserver build: remove trailing whitespace from makefiles 2014-10-08 10:46:57 -04:00
tsalvaged cmd: add flags argument to create syntax function 2014-11-24 21:09:52 -05:00
tsm41 Allow building with MIT krb5 and external roken 2014-10-08 10:52:14 -04:00
tubik Fix build for separate objdirs 2013-01-07 20:28:58 -08:00
tvlserver build: remove trailing whitespace from makefiles 2014-10-08 10:46:57 -04:00
tvolser Clean up our cleaning 2014-11-28 18:04:15 -05:00
ubik ubik: Unlock version lock before udisk_end 2014-12-02 17:57:00 -05:00
update build: remove trailing whitespace from makefiles 2014-10-08 10:46:57 -04:00
usd build: remove trailing whitespace from makefiles 2014-10-08 10:46:57 -04:00
uss uss: Make the uss parser private 2015-01-04 21:24:48 -05:00
util liboafs_util: export symbols for tabular_output 2014-12-03 01:02:47 -05:00
venus Clean up our cleaning 2014-11-28 18:04:15 -05:00
vfsck build: remove trailing whitespace from makefiles 2014-10-08 10:46:57 -04:00
viced cmd: add flags argument to create syntax function 2014-11-24 21:09:52 -05:00
vlserver vldb_check: rebuild free list with -fix 2015-01-04 21:30:03 -05:00
vol namei: Remove icreate tfd hack 2014-12-03 01:13:17 -05:00
volser volser: Break callbacks to the target of VolClone 2014-12-06 19:54:09 -05:00
WINNT Windows: Fix cm_AppendServerList 2014-11-25 11:55:01 -05:00
xstat cmd: add flags argument to create syntax function 2014-11-24 21:09:52 -05:00
.gitignore gitignore-20090615 2009-06-15 23:29:29 +00:00
DOLASTCMP.BAT
helper-splint.sh.in
libafsdep
LICENSE Rework the Kerberos Autoconf probes 2010-06-15 16:30:04 -07:00
mkdest.pl
ntbuild.bat Update windows build documentation 2013-07-02 15:14:09 -07:00
NTObjdir viced: Remove the LWP fileserver 2012-01-23 14:18:59 -08:00
rmbat.bat
rmbat.rsp fix newline conventions 2010-07-06 08:16:25 -07:00
SOURCE-MAP viced: Remove the LWP fileserver 2012-01-23 14:18:59 -08:00
splint.cfg
symlink.bat
TechNotes-JavaAPI Finish deorbiting libjuafs.a 2014-11-05 08:37:51 -05:00