staging: lustre: info leak in lnet_ping()
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 3 May 2014 20:23:29 +0000 (23:23 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 May 2014 23:10:41 +0000 (16:10 -0700)
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.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lnet/lnet/api-ni.c

index 3f1fdaa2989185cc6433b887e5844204d6cdf91e..3f878dee2e4287fb36b0bb722ff10282860b6abd 100644 (file)
@@ -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;