mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Dan Rosenberg <drosenberg@vsecurity.com>
Cc: Jaroslav Kysela <perex@perex.cz>,
	security@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sound/pci/asihpi: check adapter index in hpi_ioctl
Date: Fri, 18 Mar 2011 07:55:09 +0100	[thread overview]
Message-ID: <s5h62rgzzn6.wl%tiwai@suse.de> (raw)
In-Reply-To: <1300401144.1796.4.camel@dan>

At Thu, 17 Mar 2011 18:32:24 -0400,
Dan Rosenberg wrote:
> 
> The user-supplied index into the adapters array needs to be checked, or
> an out-of-bounds kernel pointer could be accessed and used, leading to
> potentially exploitable memory corruption.
> 
> Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com>

Applied now (with Cc to stable kernel).  Thanks.


Takashi

> ---
>  sound/pci/asihpi/hpioctl.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/sound/pci/asihpi/hpioctl.c b/sound/pci/asihpi/hpioctl.c
> index 22dbd91..448dd01 100644
> --- a/sound/pci/asihpi/hpioctl.c
> +++ b/sound/pci/asihpi/hpioctl.c
> @@ -155,6 +155,11 @@ long asihpi_hpi_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
>  		goto out;
>  	}
>  
> +	if (hm->h.adapter_index >= HPI_MAX_ADAPTERS) {
> +		err = -EINVAL;
> +		goto out;
> +	}
> +
>  	pa = &adapters[hm->h.adapter_index];
>  	hr->h.size = 0;
>  	if (hm->h.object == HPI_OBJ_SUBSYSTEM) {
> 
> 

      parent reply	other threads:[~2011-03-18  6:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-17 22:32 Dan Rosenberg
2011-03-17 22:54 ` [stable] " Greg KH
2011-03-18  6:55 ` Takashi Iwai [this message]

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=s5h62rgzzn6.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=drosenberg@vsecurity.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=security@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

all inboxes | Powered by JetHome®