]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
media: vivid: use vfree() instead of kfree() for dev->bitmap_cap
authorAlexander Potapenko <glider@google.com>
Thu, 4 Apr 2019 14:56:46 +0000 (10:56 -0400)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit5de92d1a67174b40e04f001cdc26a49583cb831b
tree8200d505a2d536c3707f3a13fd1d17112f13b00a
parent177829068642e76c62e04b19a31ec5fdd6441907
media: vivid: use vfree() instead of kfree() for dev->bitmap_cap

BugLink: https://bugs.launchpad.net/bugs/1838700
commit dad7e270ba712ba1c99cd2d91018af6044447a06 upstream.

syzkaller reported crashes on kfree() called from
vivid_vid_cap_s_selection(). This looks like a simple typo, as
dev->bitmap_cap is allocated with vzalloc() throughout the file.

Fixes: ef834f7836ec0 ("[media] vivid: add the video capture and output
parts")

Signed-off-by: Alexander Potapenko <glider@google.com>
Reported-by: Syzbot <syzbot+6c0effb5877f6b0344e2@syzkaller.appspotmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/media/platform/vivid/vivid-vid-cap.c