Commit ee3b94e2 authored by Willy Tarreau's avatar Willy Tarreau Committed by Greg Kroah-Hartman

sound: ensure device number is valid in snd_seq_oss_synth_make_info

commit 82e68f7f upstream

snd_seq_oss_synth_make_info() incorrectly reports information
to userspace without first checking for the validity of the
device number, leading to possible information leak (CVE-2008-3272).
Reported-By: default avatarTobias Klein <tk@trapkit.de>
Acked-and-tested-by: default avatarTakashi Iwai <tiwai@suse.de>
Cc: stable@kernel.org
Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 8256c73d
...@@ -604,6 +604,9 @@ snd_seq_oss_synth_make_info(struct seq_oss_devinfo *dp, int dev, struct synth_in ...@@ -604,6 +604,9 @@ snd_seq_oss_synth_make_info(struct seq_oss_devinfo *dp, int dev, struct synth_in
{ {
struct seq_oss_synth *rec; struct seq_oss_synth *rec;
if (dev < 0 || dev >= dp->max_synthdev)
return -ENXIO;
if (dp->synths[dev].is_midi) { if (dp->synths[dev].is_midi) {
struct midi_info minf; struct midi_info minf;
snd_seq_oss_midi_make_info(dp, dp->synths[dev].midi_mapped, &minf); snd_seq_oss_midi_make_info(dp, dp->synths[dev].midi_mapped, &minf);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment