From: Benjamin Kaduk Date: Tue, 15 Mar 2016 04:15:20 +0000 (-0500) Subject: OPENAFS-SA-2016-002 AFSStoreVolumeStatus information leak X-Git-Tag: upstream/1.6.17^2~4 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=3ed975016290f916047fe2ac04303ee393e18a7a;p=packages%2Fo%2Fopenafs.git OPENAFS-SA-2016-002 AFSStoreVolumeStatus information leak The AFSStoreVolumeStatus structure is used as an input to the RXAFS_SetVolumeStatus RPC; it contains a Mask field that controls which of the other fields will actually be read by the server during the RPC processing. Unfortunately, the client only wrote to the fields indicated by the mask, leaving the other fields uninitialized for transmission on the wire, leaking some contents of kernel memory. Plug the information leak by zeroing the entire structure before use. FIXES 132847 Change-Id: Ia7aaccd53db56c7359552b70113f9ae5edbd833e --- diff --git a/src/WINNT/afsd/cm_ioctl.c b/src/WINNT/afsd/cm_ioctl.c index db32eecad..172cbc082 100644 --- a/src/WINNT/afsd/cm_ioctl.c +++ b/src/WINNT/afsd/cm_ioctl.c @@ -632,6 +632,7 @@ cm_IoctlSetVolumeStatus(struct cm_ioctl *ioctlp, struct cm_user *userp, cm_scach clientchar_t *strp; struct rx_connection * rxconnp; + memset(&storeStat, 0, sizeof(storeStat)); #ifdef AFS_FREELANCE_CLIENT if ( scp->fid.cell == AFS_FAKE_ROOT_CELL_ID && scp->fid.volume == AFS_FAKE_ROOT_VOL_ID ) { code = CM_ERROR_NOACCESS; diff --git a/src/afs/afs_pioctl.c b/src/afs/afs_pioctl.c index 0c96172be..19a48650e 100644 --- a/src/afs/afs_pioctl.c +++ b/src/afs/afs_pioctl.c @@ -2051,6 +2051,7 @@ DECL_PIOCTL(PSetVolumeStatus) AFS_STATCNT(PSetVolumeStatus); if (!avc) return EINVAL; + memset(&storeStat, 0, sizeof(storeStat)); tvp = afs_GetVolume(&avc->f.fid, areq, READ_LOCK); if (tvp) {