Skip to content

Commit 4b61843

Browse files
Salva Peirógregkh
Salva Peiró
authored andcommitted
staging/dgnc: fix info leak in ioctl
The dgnc_mgmt_ioctl() code fails to initialize the 16 _reserved bytes of struct digi_dinfo after the ->dinfo_nboards member. Add an explicit memset(0) before filling the structure to avoid the info leak. Signed-off-by: Salva Peiró <speirofr@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 561e296 commit 4b61843

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: drivers/staging/dgnc/dgnc_mgmt.c

+1
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ long dgnc_mgmt_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
110110

111111
spin_lock_irqsave(&dgnc_global_lock, flags);
112112

113+
memset(&ddi, 0, sizeof(ddi));
113114
ddi.dinfo_nboards = dgnc_NumBoards;
114115
sprintf(ddi.dinfo_version, "%s", DG_PART);
115116

0 commit comments

Comments
 (0)