Skip to content

Commit 82e68f7

Browse files
wtarreautorvalds
authored andcommitted
sound: ensure device number is valid in snd_seq_oss_synth_make_info
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: Tobias Klein <tk@trapkit.de> Acked-and-tested-by: Takashi Iwai <tiwai@suse.de> Cc: stable@kernel.org Signed-off-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 82248a5 commit 82e68f7

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎sound/core/seq/oss/seq_oss_synth.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,9 @@ snd_seq_oss_synth_make_info(struct seq_oss_devinfo *dp, int dev, struct synth_in
604604
{
605605
struct seq_oss_synth *rec;
606606

607+
if (dev < 0 || dev >= dp->max_synthdev)
608+
return -ENXIO;
609+
607610
if (dp->synths[dev].is_midi) {
608611
struct midi_info minf;
609612
snd_seq_oss_midi_make_info(dp, dp->synths[dev].midi_mapped, &minf);

0 commit comments

Comments
 (0)