From: Anton Vorontsov <cbouatmailru@gmail.com>
To: Dirk Brandewie <dirk.brandewie@gmail.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
Grant Likely <grant.likely@secretlab.ca>,
Rob Herring <rob.herring@calxeda.com>,
MyungJoo Ham <myungjoo.ham@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Philip Rakity <prakity@marvell.com>,
linux-kernel@vger.kernel.org,
devicetree-discuss@lists.ozlabs.org,
kernel-janitors@vger.kernel.org
Subject: Re: [patch] max17042_battery: fix a couple buffer overflows
Date: Sat, 05 May 2012 02:26:42 +0000 [thread overview]
Message-ID: <20120505022642.GA812@lizard> (raw)
In-Reply-To: <4F6224E2.5060006@gmail.com>
On Thu, Mar 15, 2012 at 10:20:34AM -0700, Dirk Brandewie wrote:
> On 03/15/2012 04:37 AM, Dan Carpenter wrote:
> >There are a couple issues here caused by confusion between sizeof()
> >and ARRAY_SIZE(). "table_size" should be the number of elements, but we
> >should allocate it with kcalloc() so that we allocate the correct number
> >of bytes.
> >
> >In max17042_init_model() we don't allocate enough space so we go past
> >the end of the array in max17042_read_model_data() and
> >max17042_model_data_compare().
> >
> >In max17042_verify_model_lock() we allocate the right amount of space
> >but we call max17042_read_model_data() with the wrong number of elements
> >and also in the for loop we go past the end of the array.
> >
> >Signed-off-by: Dan Carpenter<dan.carpenter@oracle.com>
> Acked-by: Dirk Brandewie <dirk.brandewie@gmail.com>
>
> Typo in first ack :-(
Applied, thanks! :-)
--
Anton Vorontsov
Email: cbouatmailru@gmail.com
WARNING: multiple messages have this Message-ID (diff)
From: Anton Vorontsov <cbouatmailru@gmail.com>
To: Dirk Brandewie <dirk.brandewie@gmail.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
Grant Likely <grant.likely@secretlab.ca>,
Rob Herring <rob.herring@calxeda.com>,
MyungJoo Ham <myungjoo.ham@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Philip Rakity <prakity@marvell.com>,
linux-kernel@vger.kernel.org,
devicetree-discuss@lists.ozlabs.org,
kernel-janitors@vger.kernel.org
Subject: Re: [patch] max17042_battery: fix a couple buffer overflows
Date: Fri, 4 May 2012 19:26:42 -0700 [thread overview]
Message-ID: <20120505022642.GA812@lizard> (raw)
In-Reply-To: <4F6224E2.5060006@gmail.com>
On Thu, Mar 15, 2012 at 10:20:34AM -0700, Dirk Brandewie wrote:
> On 03/15/2012 04:37 AM, Dan Carpenter wrote:
> >There are a couple issues here caused by confusion between sizeof()
> >and ARRAY_SIZE(). "table_size" should be the number of elements, but we
> >should allocate it with kcalloc() so that we allocate the correct number
> >of bytes.
> >
> >In max17042_init_model() we don't allocate enough space so we go past
> >the end of the array in max17042_read_model_data() and
> >max17042_model_data_compare().
> >
> >In max17042_verify_model_lock() we allocate the right amount of space
> >but we call max17042_read_model_data() with the wrong number of elements
> >and also in the for loop we go past the end of the array.
> >
> >Signed-off-by: Dan Carpenter<dan.carpenter@oracle.com>
> Acked-by: Dirk Brandewie <dirk.brandewie@gmail.com>
>
> Typo in first ack :-(
Applied, thanks! :-)
--
Anton Vorontsov
Email: cbouatmailru@gmail.com
next prev parent reply other threads:[~2012-05-05 2:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-15 11:37 [patch] max17042_battery: fix a couple buffer overflows Dan Carpenter
2012-03-15 11:37 ` Dan Carpenter
2012-03-15 16:57 ` Dirk Brandewie
2012-03-15 16:57 ` Dirk Brandewie
2012-03-15 17:20 ` Dirk Brandewie
2012-03-15 17:20 ` Dirk Brandewie
2012-05-05 2:26 ` Anton Vorontsov [this message]
2012-05-05 2:26 ` Anton Vorontsov
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=20120505022642.GA812@lizard \
--to=cbouatmailru@gmail.com \
--cc=dan.carpenter@oracle.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=dirk.brandewie@gmail.com \
--cc=grant.likely@secretlab.ca \
--cc=kernel-janitors@vger.kernel.org \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
--cc=prakity@marvell.com \
--cc=rob.herring@calxeda.com \
/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.