The ListAddrByAttributes structure is used as an input to the GetAddrsU
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 client memory.
Plug the information leak by zeroing the entire structure before use.
FIXES 132847
Change-Id: I9ccf814ceff206ddb3a74da97dc50b7e1e3c2014
bulkaddrs addr_multi;
int i;
+ memset(&m_attrs, 0, sizeof(m_attrs));
/*
* Check to see if this is a multihomed address server
*/
char hoststr[16];
ListAddrByAttributes m_attrs;
+ memset(&m_attrs, 0, sizeof(m_attrs));
memset(&addrs, 0, sizeof(addrs));
memset(&spare3, 0, sizeof(spare3));
code =
printf("[0x%x %u] (special multi-homed entry)\n",
*addrp, *addrp);
+ memset(&attrs, 0, sizeof(attrs));
attrs.Mask = VLADDR_INDEX;
mhaddrs.bulkaddrs_val = 0;
mhaddrs.bulkaddrs_len = 0;
addrs2.bulkaddrs_val = 0;
addrs2.bulkaddrs_len = 0;
+ memset(&attrs, 0, sizeof(attrs));
attrs.Mask = VLADDR_INDEX;
attrs.index = (base * VL_MHSRV_PERBLK) + index;
code =