From: Dan Carpenter Date: Mon, 4 Mar 2013 12:19:18 +0000 (+0300) Subject: ALSA: seq: seq_oss_event: missing range checks X-Git-Tag: v3.9-rc2~10^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85c50a5899b23f4f893b0898b286023157b98376;p=pandora-kernel.git ALSA: seq: seq_oss_event: missing range checks The "dev" variable could be out of bounds. Calling snd_seq_oss_synth_is_valid() checks that it is is a valid device which has been opened. We check this inside set_note_event() so this function can't succeed without a valid "dev". But we need to do the check earlier to prevent invalid dereferences and memory corruption. One call tree where "dev" could be out of bounds is: -> snd_seq_oss_oob_user() -> snd_seq_oss_process_event() -> extended_event() -> note_on_event() Signed-off-by: Dan Carpenter Signed-off-by: Takashi Iwai --- Reading git-diff-tree failed