]> 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)
committerTakashi Iwai <tiwai@suse.de>
Thu, 21 Nov 2024 11:34:43 +0000 (12:34 +0100)
commitd2913a07d9037fe7aed4b7e680684163eaed6bc4
treef304daa5d3e2bd9b1a5137f54c47bdb874b8c9a8
parent56386292a0b44b550432aaff92f28e0d0d0f0209
ALSA: pcm: Add sanity NULL check for the default mmap fault handler

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>
sound/core/pcm_native.c