]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
ALSA: pcm: Fix UAF in snd_pcm_oss_get_formats()
authorTakashi Iwai <tiwai@suse.de>
Sat, 10 Mar 2018 22:04:23 +0000 (23:04 +0100)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Wed, 21 Mar 2018 16:40:07 +0000 (13:40 -0300)
commit7219fa1b76dd6c78d4f299531e34d12fa80412ee
treeddc0ed11403082a69ba2a0384b7aacbe8abfe475
parent80b233dbceb9d749702e59cdb325d830fed47862
ALSA: pcm: Fix UAF in snd_pcm_oss_get_formats()

BugLink: http://bugs.launchpad.net/bugs/1757465
commit 01c0b4265cc16bc1f43f475c5944c55c10d5768f upstream.

snd_pcm_oss_get_formats() has an obvious use-after-free around
snd_mask_test() calls, as spotted by syzbot.  The passed format_mask
argument is a pointer to the hw_params object that is freed before the
loop.  What a surprise that it has been present since the original
code of decades ago...

Reported-by: syzbot+4090700a4f13fccaf648@syzkaller.appspotmail.com
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
sound/core/oss/pcm_oss.c