OPENAFS-SA-2018-002 butc: prevent TC_ReadLabel information leak
authorMark Vitale <mvitale@sinenomine.net>
Tue, 26 Jun 2018 09:00:25 +0000 (05:00 -0400)
committerBenjamin Kaduk <kaduk@mit.edu>
Sun, 9 Sep 2018 22:33:58 +0000 (17:33 -0500)
commit52f4d63148323e7d605f9194ff8c1549756e654b
treee673a4c00a7aa86f6b0a13905a1a5200d6451615
parente96771471134102d3879a0ac8b2c4ef9d91a61b8
OPENAFS-SA-2018-002 butc: prevent TC_ReadLabel information leak

TC_ReadLabel (backup readlabel) does not initialize its output buffer
completely.  It leaks butc memory contents over the wire:

struct tc_tapeLabel
- up to 32 bytes from member afsname (TC_MAXTAPELEN 32)
- up to 32 bytes from member pname (TC_MAXTAPELEN 32)

Initialize the buffer.

[kaduk@mit.edu: move initialization to the RPC stub]

Change-Id: I30f4aa32801791913b397a58c36c86c019dc51ef
src/butc/tcprocs.c