The security problem has been reported in smfc driver.
If user sends a special ioctl command,
smfc driver can cause a kernel panic.
So it is modified to avoid kernel panic.
Change-Id: I7b5c4e295e8190cf0fb50d3c4b951a74470101ad
Signed-off-by: Seungchul Kim <sc377.kim@samsung.com>
const struct smfc_image_format *smfc_fmt,
__u32 type, struct v4l2_pix_format *pix)
{
- BUG_ON(V4L2_TYPE_IS_MULTIPLANAR(pix->pixelformat));
+ if (V4L2_TYPE_IS_MULTIPLANAR(pix->pixelformat)) {
+ dev_err(ctx->smfc->dev,
+ "Multi-planar format is not permitted.\n");
+ return false;
+ }
if (!smfc_check_capable_of_decompression(ctx->smfc, smfc_fmt, type))
return false;