From: David Miller <davem@davemloft.net>
To: hadi@cyberus.ca
Cc: error27@gmail.com, shemminger@vyatta.com, netdev@vger.kernel.org,
kernel-janitors@vger.kernel.org, matthew@wil.cx
Subject: Re: [patch] net/sched: potential data corruption
Date: Wed, 14 Jul 2010 17:56:45 -0700 (PDT) [thread overview]
Message-ID: <20100714.175645.189713068.davem@davemloft.net> (raw)
In-Reply-To: <1279036694.16376.0.camel@bigi>
From: jamal <hadi@cyberus.ca>
Date: Tue, 13 Jul 2010 11:58:14 -0400
> On Tue, 2010-07-13 at 15:21 +0200, Dan Carpenter wrote:
>> The reset_policy() does:
>> memset(d->tcfd_defdata, 0, SIMP_MAX_DATA);
>> strlcpy(d->tcfd_defdata, defdata, SIMP_MAX_DATA);
>>
>> In the original code, the size of d->tcfd_defdata wasn't fixed and if
>> strlen(defdata) was less than 31, reset_policy() would cause memory
>> corruption.
>>
>> Please Note: The original alloc_defdata() assumes defdata is 32
>> characters and a NUL terminator while reset_policy() assumes defdata is
>> 31 characters and a NUL. This patch updates alloc_defdata() to match
>> reset_policy() (ie a shorter string). I'm not very familiar with this
>> code so please review carefully.
>>
>> Signed-off-by: Dan Carpenter <error27@gmail.com>
>
>
> Acked-by: Jamal Hadi Salim <hadi@cyberus.ca>
Applied, thanks.
prev parent reply other threads:[~2010-07-15 0:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-13 13:21 [patch] net/sched: potential data corruption Dan Carpenter
2010-07-13 15:58 ` jamal
2010-07-15 0:56 ` David Miller [this message]
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=20100714.175645.189713068.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=error27@gmail.com \
--cc=hadi@cyberus.ca \
--cc=kernel-janitors@vger.kernel.org \
--cc=matthew@wil.cx \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).