Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Chen Gang <gang.chen@asianux.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: kaber@trash.net, kuznet@ms2.inr.ac.ru, jmorris@namei.org,
	yoshfuji@linux-ipv6.org, David Miller <davem@davemloft.net>,
	netfilter-devel@vger.kernel.org, netfilter@vger.kernel.org,
	coreteam@netfilter.org, netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH v2] ipv4: netfilter: always let NUL terminated string ended by '\0'
Date: Fri, 24 May 2013 09:11:08 +0800	[thread overview]
Message-ID: <519EBE2C.1010005@asianux.com> (raw)
In-Reply-To: <20130523122631.GA32141@localhost>

On 05/23/2013 08:26 PM, Pablo Neira Ayuso wrote:
> On Thu, May 23, 2013 at 07:50:46PM +0800, Chen Gang wrote:
>> > 
>> > For NUL terminated string, need always be sure of ended by '\0'.
>> > 
>> > 'prefix' max length is 128 (NF_LOG_PREFIXLEN), and 'pm->prefix' max
>> > length is 32 (ULOG_PREFIX_LEN), so really need notice it.
>> > 
>> > 'pm' is 'struct ulog_packet_msg_t' which may be copied to user mode
>> > (defined in "include/uapi/..."), so can not use strlcpy() instead of.
> That's fixing a real bug. We're passing strings that are longer than
> 32 bytes from nf_conntrack_tcp via nf_log, if ipt_ULOG is used, it
> will pass a non-null terminated string.
> 
> I'm going to rework the patch description to include this and apply
> this patch.
> 
> Thanks Chen.
> 
> 

Thank you too.

-- 
Chen Gang

Asianux Corporation

      reply	other threads:[~2013-05-24  1:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-17  8:39 [PATCH] ipv4: netfilter: always let NUL terminated string ended by '\0' Chen Gang
2013-05-23 11:08 ` Pablo Neira Ayuso
2013-05-23 11:39   ` Chen Gang
2013-05-23 11:49     ` Pablo Neira Ayuso
2013-05-23 11:59       ` Chen Gang
2013-05-23 11:50   ` [PATCH v2] " Chen Gang
2013-05-23 12:26     ` Pablo Neira Ayuso
2013-05-24  1:11       ` Chen Gang [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=519EBE2C.1010005@asianux.com \
    --to=gang.chen@asianux.com \
    --cc=coreteam@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=jmorris@namei.org \
    --cc=kaber@trash.net \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=netfilter@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=yoshfuji@linux-ipv6.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