Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2fc2111c authored by Michael Buesch's avatar Michael Buesch Committed by David S. Miller
Browse files

ide-tape: Don't leak kernel stack information



Don't leak kernel stack information through uninitialized structure members.

Signed-off-by: default avatarMichael Buesch <mb@bu3sch.de>
Acked-by: default avatarBorislav Petkov <petkovbb@gmail.com&gt;.>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bc146d23
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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)))