IB/hfi1: info leak in get_ctxt_info()
Subsystems (3)
PATCH 1/1 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 don't disclose some uninitialized stack data.
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)struct hfi1_filedata *fd = fp->private_data;int ret =0 ; +memset (&cinfo,0 ,sizeof (cinfo)); ret =hfi1_get_base_kinfo (uctxt, &cinfo);if (ret <0 ) goto done;
Quoted 2 lines · Dan Carpenter
The cinfo struct has a hole after the last struct member so we need to zero it out. Otherwise we don't disclose some uninitialized stack data.
I think the "don't" wasn't intended in the second sentence?
julia
Quoted 20 lines
Signed-off-by Dan Carpenter <[email protected]>drivers/staging/rdma/hfi1/file_ops.c +1
-1@@ -1181,6 +1181,7 @@ static int get_ctxt_info(struct file *fp, void __user *ubase, __u32 len)struct hfi1_filedata *fd = fp->private_data;int ret =0 ; +memset (&cinfo,0 ,sizeof (cinfo)); ret =hfi1_get_base_kinfo (uctxt, &cinfo);if (ret <0 ) goto done; --To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): alpine.DEB.2.02.1509160824370.2049-bi+AKbBUZKagILUCTcTcHdKyNwTtLsGr@public.gmane.org
Quoted 7 lines · Julia Lawall
Quoted 2 lines · Dan Carpenter
The cinfo struct has a hole after the last struct member so we need to zero it out. Otherwise we don't disclose some uninitialized stack data.
I think the "don't" wasn't intended in the second sentence?
Derp... I will resend.
regards,
dan carpenter
PATCH v2 1/1 IB/hfi1: info leak in get_ctxt_info()
In reply to Julia LawallThe cinfo struct has a hole after the last struct member so we need to zero it out. Otherwise we disclose some uninitialized stack data.
---
v2: typo in changelog
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)struct hfi1_filedata *fd = fp->private_data;int ret =0 ; +memset (&cinfo,0 ,sizeof (cinfo)); ret =hfi1_get_base_kinfo (uctxt, &cinfo);if (ret <0 ) goto done;
Doug Ledford
AppliedQuoted 4 lines · Dan Carpenter
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.
Signed-off-by Dan Carpenter <[email protected]>
Thanks, applied.
Signature · 2 lines
Doug Ledford <[email protected]> GPG KeyID: 0E572FDD