media: vivid: s_fbuf: add more sanity checks
stable inclusion from stable-v5.10.153 commit 1cf51d51581c1e0a876623e0a89d10029fc8cdc4 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I64YCA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=1cf51d51581c1e0a876623e0a89d10029fc8cdc4 -------------------------------- [ Upstream commit f8bcaf71 ] VIDIOC_S_FBUF is by definition a scary ioctl, which is why only root can use it. But at least check if the framebuffer parameters match that of one of the framebuffer created by vivid, and reject anything else. Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl> Fixes: ef834f78 ([media] vivid: add the video capture and output parts) Signed-off-by: NMauro Carvalho Chehab <mchehab@kernel.org> Signed-off-by: NSasha Levin <sashal@kernel.org> Signed-off-by: NLipeng Sang <sanglipeng1@jd.com>
Showing
想要评论请 注册 或 登录