From: Dan Carpenter <dan.carpenter@oracle.com>
To: stoth@linuxtv.org
Cc: linux-media@vger.kernel.org
Subject: re: V4L/DVB (8986): cx24116: Adding DVB-S2 demodulator support
Date: Tue, 5 Feb 2013 22:00:32 +0300 [thread overview]
Message-ID: <20130205190032.GA17573@elgon.mountain> (raw)
Hello Steven Toth,
The patch 0d46748c3f87: "V4L/DVB (8986): cx24116: Adding DVB-S2
demodulator support" from Sep 4, 2008, leads to the following warning:
"drivers/media/dvb-frontends/cx24116.c:983 cx24116_send_diseqc_msg()
error: buffer overflow 'd->msg' 6 <= 23"
drivers/media/dvb-frontends/cx24116.c
977 /* Validate length */
978 if (d->msg_len > (CX24116_ARGLEN - CX24116_DISEQC_MSGOFS))
979 return -EINVAL;
980
981 /* DiSEqC message */
982 for (i = 0; i < d->msg_len; i++)
983 state->dsec_cmd.args[CX24116_DISEQC_MSGOFS + i] = d->msg[i];
984
The state->dsec_cmd.args[] array has 30 elements. The d->msg[] array
has only 6 elements. We check that we don't write past the end of the
bigger array, but we could read past the end of the smaller array.
d->msg_len comes from the user.
I don't know if this can result in an information leak?
It's weird that we're copying bogus data into the state->dsec_cmd.args[]
array.
regards,
dan carpenter
reply other threads:[~2013-02-05 19:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130205190032.GA17573@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=linux-media@vger.kernel.org \
--cc=stoth@linuxtv.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox