From: Michael Buesch Date: Sun, 19 Jul 2009 09:15:19 +0000 (+0000) Subject: ide-tape: Don't leak kernel stack information X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2fc2111c2729462b99b6e37f39a48917054776f5;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git ide-tape: Don't leak kernel stack information Don't leak kernel stack information through uninitialized structure members. Signed-off-by: Michael Buesch Acked-by: Borislav Petkov . Signed-off-by: David S. Miller --- diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 013dc595fab6..bc5fb12b913c 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c @@ -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)))