Skip to contentSkip to conversation

staging: lustre: info leak in lnet_ping()

PATCH New Dan Carpenter 1 participant 1 message May 3, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: lustre: info leak in lnet_ping()

On 64 bit systems there is a 4 byte hole after the last member of the struct. We should clear it to avoid disclosing stack information.

drivers/staging/lustre/lnet/lnet/api-ni.c +1 -0
index 85b8d81..d4cacb90 100644
@@ -1927,6 +1927,7 @@ lnet_ping (lnet_process_id_t id, int timeout_ms, lnet_process_id_t *ids, int n_i
 
 	rc = -EFAULT;			   /* If I SEGV... */
 
+	memset(&tmpid, 0, sizeof(tmpid));
 	for (i = 0; i < n_ids; i++) {
 		tmpid.pid = info->pi_pid;
 		tmpid.nid = info->pi_ni[i].ns_nid;