Skip to content

Commit

Permalink
ide-tape: Don't leak kernel stack information
Browse files Browse the repository at this point in the history
Don't leak kernel stack information through uninitialized structure members.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Acked-by: Borislav Petkov <petkovbb@gmail.com>.
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Michael Buesch authored and David S. Miller committed Jul 22, 2009
1 parent bc146d2 commit 2fc2111
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/ide/ide-tape.c
Original file line number Diff line number Diff line change
Expand Up @@ -1064,6 +1064,7 @@ static int idetape_blkdev_ioctl(ide_drive_t *drive, unsigned int cmd,
tape->best_dsc_rw_freq = config.dsc_rw_frequency;
break;
case 0x0350:
memset(&config, 0, sizeof(config));
config.dsc_rw_frequency = (int) tape->best_dsc_rw_freq;
config.nr_stages = 1;
if (copy_to_user(argp, &config, sizeof(config)))
Expand Down

0 comments on commit 2fc2111

Please sign in to comment.