auth: Catch long cells in backwards compat code
authorSimon Wilkinson <sxw@your-file-system.com>
Sat, 2 Mar 2013 12:55:18 +0000 (12:55 +0000)
committerDerrick Brashear <shadow@your-file-system.com>
Mon, 11 Mar 2013 14:26:56 +0000 (07:26 -0700)
commit8c664a8c0f25e472bd3ba30f31fbbf707fa4e873
tree5c8d1609a310551a13bb5fa9709aa9ac4afe5415
parentb0b3def56c15161df28059e270f0360c31241217
auth: Catch long cells in backwards compat code

ktc_SetTokenEx can fall back to calling the SetToken pioctl when
the kernel module doesn't support the newer call. When we do this,
we have to transform the token structure into the older format.

Catch tokens whose cells are too long to be represented in the
older format, and bail with KTC_INVAL, rather than overflowing the
array.

Caught by coverity (#985770)

Change-Id: Ibaa1cc92c494cc6f4e56ebe7b16109d4558db131
Reviewed-on: http://gerrit.openafs.org/9449
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
src/auth/ktc.c