]> git.hungrycats.org Git - linux/commit
ALSA: pcm: Add sanity NULL check for the default mmap fault handler
authorTakashi Iwai <tiwai@suse.de>
Wed, 20 Nov 2024 14:11:02 +0000 (15:11 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2024 12:54:23 +0000 (13:54 +0100)
commitf0ce9e24eff1678c16276f9717f26a78202506a2
treeffc6122a75626b505d9080dd5011d261de76d606
parent4c65e76b7ff0c54bfc7bff3abde951031aca68fc
ALSA: pcm: Add sanity NULL check for the default mmap fault handler

commit d2913a07d9037fe7aed4b7e680684163eaed6bc4 upstream.

A driver might allow the mmap access before initializing its
runtime->dma_area properly.  Add a proper NULL check before passing to
virt_to_page() for avoiding a panic.

Reported-by: syzbot+4bf62a7b1d0f4fdb7ae2@syzkaller.appspotmail.com
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20241120141104.7060-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/core/pcm_native.c