Skip to content

Commit 96b3404

Browse files
Salva Peiródavem330
Salva Peiró
authored andcommitted
farsync: fix info leak in ioctl
The fst_get_iface() code fails to initialize the two padding bytes of struct sync_serial_settings after the ->loopback member. Add an explicit memset(0) before filling the structure to avoid the info leak. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent bf58175 commit 96b3404

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: drivers/net/wan/farsync.c

+1
Original file line numberDiff line numberDiff line change
@@ -1972,6 +1972,7 @@ fst_get_iface(struct fst_card_info *card, struct fst_port_info *port,
19721972
}
19731973

19741974
i = port->index;
1975+
memset(&sync, 0, sizeof(sync));
19751976
sync.clock_rate = FST_RDL(card, portConfig[i].lineSpeed);
19761977
/* Lucky card and linux use same encoding here */
19771978
sync.clock_type = FST_RDB(card, portConfig[i].internalClock) ==

0 commit comments

Comments
 (0)