rx: rx_InitHost do not overwrite RAND_bytes rx_nextCid 91/14491/2
authorJeffrey Altman <jaltman@auristor.com>
Thu, 14 Jan 2021 14:41:39 +0000 (09:41 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Thu, 14 Jan 2021 17:23:39 +0000 (12:23 -0500)
commita3bc7ff1501d51ceb3b39d9caed62c530a804473
tree693e20e2bcb63014f69f1a49999b620d2739b1ab
parent32dfff2c9881e76446446f8c8875b978ca4cbefb
rx: rx_InitHost do not overwrite RAND_bytes rx_nextCid

39b165cdda941181845022c183fea1c7af7e4356 ("Move epoch and cid
generation into the rx core") introduced the use of RAND_bytes()
to generate the initial 'rx_nextCid' but failed to remove the

  rx_nextCid = ((tv.tv_sec ^ tv.tv_usec) << RX_CIDSHIFT;

assignment inherited from IBM/Transarc.

At Thu, 14 Jan 2021 08:25:36 GMT the IBM inherited calculation
overflows the value CID range.   This triggers broken overflow
logic in update_nextCid().

Change-Id: Ib7283def1ded9792d394133a3969a6d86f3a6123
Reviewed-on: https://gerrit.openafs.org/14491
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Hutzelman <jhutz@cmu.edu>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Tested-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/rx/rx.c