From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Borislav Petkov <petkovbb@googlemail.com>
Cc: Michael Buesch <mb@bu3sch.de>,
davem@davemloft.net, linux-ide@vger.kernel.org
Subject: Re: [PATCH] ide-tape: Don't leak kernel stack information
Date: Tue, 21 Jul 2009 12:06:55 +0200 [thread overview]
Message-ID: <200907211206.55708.bzolnier@gmail.com> (raw)
In-Reply-To: <20090720073813.GA27834@liondog.tnic>
On Monday 20 July 2009 09:38:14 Borislav Petkov wrote:
> On Sun, Jul 19, 2009 at 09:15:19PM +0200, Michael Buesch wrote:
> > Don't leak kernel stack information through uninitialized structure members.
> >
> > Signed-off-by: Michael Buesch <mb@bu3sch.de>
> > Cc: stable@kernel.org
> >
> > ---
> >
> > This patch is only compile tested.
> >
> > ---
> > drivers/ide/ide-tape.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > --- linux-2.6.orig/drivers/ide/ide-tape.c
> > +++ linux-2.6/drivers/ide/ide-tape.c
> > @@ -1057,20 +1057,21 @@ static int idetape_blkdev_ioctl(ide_driv
> >
> > debug_log(DBG_PROCS, "Enter %s\n", __func__);
> >
> > switch (cmd) {
> > case 0x0340:
> > if (copy_from_user(&config, argp, sizeof(config)))
> > return -EFAULT;
> > tape->best_dsc_rw_freq = config.dsc_rw_frequency;
> > break;
> > case 0x0350:
> > + memset(&config, 0, sizeof(config));
>
> Well, I can't find config.dsc_media_access_frequency as being used
> anywhere since the git years of the kernel. I found¹ some archaic
> kernels from 1995 (1.3 series) which used to have IDETAPE_RESET_IOCTL
> defined as 0x0350 but can't seem to find any userspace use of that
> ioctl.
>
> If there's none, you might just as well remove
> config.dsc_media_access_frequency as an alternative solution.
>
> @Bart: Any historic info I'm missing here?
We need to preserve struct idetape_config layout to not break the ioctl
(regardless if the field is really used by some user-space apps or not)..
next prev parent reply other threads:[~2009-07-20 10:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-19 19:15 [PATCH] ide-tape: Don't leak kernel stack information Michael Buesch
2009-07-20 7:38 ` Borislav Petkov
2009-07-20 10:57 ` Michael Buesch
2009-07-21 10:06 ` Bartlomiej Zolnierkiewicz [this message]
2009-07-20 10:45 ` Borislav Petkov
2009-07-21 12:10 ` Bartlomiej Zolnierkiewicz
2009-07-20 12:49 ` Borislav Petkov
2009-07-22 3:36 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200907211206.55708.bzolnier@gmail.com \
--to=bzolnier@gmail.com \
--cc=davem@davemloft.net \
--cc=linux-ide@vger.kernel.org \
--cc=mb@bu3sch.de \
--cc=petkovbb@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).