Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 82e3b88b authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

[media] cx24117: fix a buffer overflow when checking userspace params



The maximum size for a DiSEqC command is 6, according to the
userspace API. However, the code allows to write up much more values:
	drivers/media/dvb-frontends/cx24116.c:983 cx24116_send_diseqc_msg() error: buffer overflow 'd->msg' 6 <= 23

Cc: stable@vger.kernel.org
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent d7b76c91
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1043,7 +1043,7 @@ static int cx24117_send_diseqc_msg(struct dvb_frontend *fe,
	dev_dbg(&state->priv->i2c->dev, ")\n");
	dev_dbg(&state->priv->i2c->dev, ")\n");


	/* Validate length */
	/* Validate length */
	if (d->msg_len > 15)
	if (d->msg_len > sizeof(d->msg))
		return -EINVAL;
		return -EINVAL;


	/* DiSEqC message */
	/* DiSEqC message */