From: Dan Carpenter <dan.carpenter@oracle.com>
To: michaelc@cs.wisc.edu
Cc: linux-scsi@vger.kernel.org
Subject: potential buffer overrun in __iscsi_conn_send_pdu()
Date: Mon, 24 Jun 2013 18:46:31 +0300 [thread overview]
Message-ID: <20130624154631.GA31984@elgon.mountain> (raw)
My static checker complains about a possible array overflow in
__iscsi_conn_send_pdu().
drivers/scsi/libiscsi.c
743 if (data_size) {
744 memcpy(task->data, data, data_size);
745 task->data_count = data_size;
746 } else
747 task->data_count = 0;
748
"data_size" comes from skb->data and we haven't checked that it is less
than ISCSI_DEF_MAX_RECV_SEG_LEN (8192).
The call tree is:
iscsi_if_recv_msg()
iscsi_conn_send_pdu()
__iscsi_conn_send_pdu()
I'm a newbie to this code, so I'm not sure if this is a real bug or not.
regards,
dan carpenter
next reply other threads:[~2013-06-24 15:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-24 15:46 Dan Carpenter [this message]
2014-09-01 18:06 ` potential buffer overrun in __iscsi_conn_send_pdu() Dan Carpenter
2014-09-02 3:22 ` Mike Christie
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=20130624154631.GA31984@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=linux-scsi@vger.kernel.org \
--cc=michaelc@cs.wisc.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.