2008-01-01 13:50:58

by Adrian Bunk

[permalink] [raw]
Subject: [2.6 patch] OSS msnd: fix array overflows

This patch fixes array overflows in the OSS msnd driver spotted by the
Coverity checker.

Signed-off-by: Adrian Bunk <[email protected]>

---

This patch has been sent on:
- 27 Oct 2007

97463a59dfb9ccb915d3b615225c98cb3e310c0a
diff --git a/sound/oss/msnd.h b/sound/oss/msnd.h
index 05cf786..d0ca582 100644
--- a/sound/oss/msnd.h
+++ b/sound/oss/msnd.h
@@ -233,8 +233,8 @@ typedef struct multisound_dev {
spinlock_t lock;
int nresets;
unsigned long recsrc;
- int left_levels[16];
- int right_levels[16];
+ int left_levels[32];
+ int right_levels[32];
int mixer_mod_count;
int calibrate_signal;
int play_sample_size, play_sample_rate, play_channels;


2008-01-01 18:43:34

by Oliver Pinter

[permalink] [raw]
Subject: Re: [2.6 patch] OSS msnd: fix array overflows

then it is auch to 2.6.22-stable?

On 1/1/08, Adrian Bunk <[email protected]> wrote:
> This patch fixes array overflows in the OSS msnd driver spotted by the
> Coverity checker.
>
> Signed-off-by: Adrian Bunk <[email protected]>
>
> ---
>
> This patch has been sent on:
> - 27 Oct 2007
>
> 97463a59dfb9ccb915d3b615225c98cb3e310c0a
> diff --git a/sound/oss/msnd.h b/sound/oss/msnd.h
> index 05cf786..d0ca582 100644
> --- a/sound/oss/msnd.h
> +++ b/sound/oss/msnd.h
> @@ -233,8 +233,8 @@ typedef struct multisound_dev {
> spinlock_t lock;
> int nresets;
> unsigned long recsrc;
> - int left_levels[16];
> - int right_levels[16];
> + int left_levels[32];
> + int right_levels[32];
> int mixer_mod_count;
> int calibrate_signal;
> int play_sample_size, play_sample_rate, play_channels;
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>


--
Thanks,
Oliver

2008-01-01 23:15:44

by Adrian Bunk

[permalink] [raw]
Subject: Re: [2.6 patch] OSS msnd: fix array overflows

On Tue, Jan 01, 2008 at 07:43:23PM +0100, Oliver Pinter (Pintér Olivér) wrote:
> then it is auch to 2.6.22-stable?

That's a very old bug in a driver for ancient hardware, so there's no
need to hurry.

> On 1/1/08, Adrian Bunk <[email protected]> wrote:
> > This patch fixes array overflows in the OSS msnd driver spotted by the
> > Coverity checker.
> >
> > Signed-off-by: Adrian Bunk <[email protected]>
> >
> > ---
> >
> > This patch has been sent on:
> > - 27 Oct 2007
> >
> > 97463a59dfb9ccb915d3b615225c98cb3e310c0a
> > diff --git a/sound/oss/msnd.h b/sound/oss/msnd.h
> > index 05cf786..d0ca582 100644
> > --- a/sound/oss/msnd.h
> > +++ b/sound/oss/msnd.h
> > @@ -233,8 +233,8 @@ typedef struct multisound_dev {
> > spinlock_t lock;
> > int nresets;
> > unsigned long recsrc;
> > - int left_levels[16];
> > - int right_levels[16];
> > + int left_levels[32];
> > + int right_levels[32];
> > int mixer_mod_count;
> > int calibrate_signal;
> > int play_sample_size, play_sample_rate, play_channels;
>
> Thanks,
> Oliver

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed