Don't trust # of entries from ListAttributes
authorSimon Wilkinson <sxw@your-file-system.com>
Sun, 26 Dec 2010 14:54:43 +0000 (14:54 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 27 Dec 2010 20:21:54 +0000 (12:21 -0800)
commit8992210f27671673a89a541776aa105238ad14cf
tree8c6ce82fd22d20057d8014c7596c921699c5fffe
parent95ef4cfd394345ed4c1f7902fa9dc198dcbec938
Don't trust # of entries from ListAttributes

ListAttributes returns the number of entries in its array as an RPC
argument. But, we can't trust this, as it could be manipulated and
end up pointing past the end of the returned array (which is counted,
so the entries argument is actually pointless).

Add bounds checking to the functions which use this value to prevent
this problem.

Change-Id: I62398d8f6b5c54318c1a42f1bad67a21c90ef944
Reviewed-on: http://gerrit.openafs.org/3597
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/bucoord/commands.c
src/libadmin/vos/vosutils.c
src/volser/vsutils.c