History

IB/hfi1: info leak in get_ctxt_info()

The cinfo struct has a hole after the last struct member so we need to zero it out. Otherwise we disclose some uninitialized stack data.

Dan Carpenter committed 11 years ago

Commit ebe6b2e1 parent 951842b1 file · +1 −0Browse files

Unified · Split

drivers/staging/rdma/hfi1/file_ops.c+1−0
@@ -1181,6 +1181,7 @@ static int get_ctxt_info(struct file *fp, void __user *ubase, __u32 len) · 1180 unmodified lines
11811181 struct hfi1_filedata *fd = fp->private_data;
11821182 int ret = 0;
11831183
1184+ memset(&cinfo, 0, sizeof(cinfo));
11841185 ret = hfi1_get_base_kinfo(uctxt, &cinfo);
11851186 if (ret < 0)
11861187 goto done;