public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: John Stultz <john.stultz@linaro.org>
To: kernel-janitors@vger.kernel.org
Subject: Re: [patch] staging: alarm-dev: information leak in alarm_compat_ioctl()
Date: Wed, 05 Jun 2013 00:25:17 +0000	[thread overview]
Message-ID: <51AE856D.7040407@linaro.org> (raw)
In-Reply-To: <20130603090231.GB16171@debian>

On 06/04/2013 05:07 PM, Arve Hjønnevåg wrote:
> On Tue, Jun 4, 2013 at 6:13 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:
>> If we pass an invalid clock type then "ts" is never set.  We need to
>> check for errors earlier, otherwise we end up passing uninitialized
>> stack data to userspace.
>>
>> Reported-by: John Stultz <john.stultz@linaro.org>
>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>>
>> diff --git a/drivers/staging/android/alarm-dev.c b/drivers/staging/android/alarm-dev.c
>> index c8600d9..6dc27da 100644
>> --- a/drivers/staging/android/alarm-dev.c
>> +++ b/drivers/staging/android/alarm-dev.c
>> @@ -297,6 +297,8 @@ static long alarm_compat_ioctl(struct file *file, unsigned int cmd,
>>          }
>>
>>          rv = alarm_do_ioctl(file, cmd, &ts);
>> +       if (rv)
>> +               return rv;
>>
>>          switch (ANDROID_ALARM_BASE_CMD(cmd)) {
>>          case ANDROID_ALARM_GET_TIME(0): /* NOTE: we modified cmd above */
>> @@ -305,7 +307,7 @@ static long alarm_compat_ioctl(struct file *file, unsigned int cmd,
>>                  break;
>>          }
>>
>> -       return rv;
>> +       return 0;
>>   }
>>   #endif
>>
> Is there a separate fix for alarm_ioctl? It seems to have the same problem.
Yea, I CC'ed the kernel-team alias yesterday on Dan's original fix for 
the alarm_ioctl, which Greg has already queued.

This is just the follow-on fix to catch the same issue (as you also 
noted) in the compat_ioctl.

thanks
-john

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2013-06-05  0:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-03  9:02 [patch] staging: alarm-dev: information leak in alarm_ioctl() Dan Carpenter
2013-06-03 19:08 ` John Stultz
2013-06-04 13:13 ` [patch] staging: alarm-dev: information leak in alarm_compat_ioctl() Dan Carpenter
2013-06-05  0:07 ` Arve Hjønnevåg
2013-06-05  0:25 ` John Stultz [this message]
2013-06-05  0:49 ` Arve Hjønnevåg

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=51AE856D.7040407@linaro.org \
    --to=john.stultz@linaro.org \
    --cc=kernel-janitors@vger.kernel.org \
    /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