[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130523122631.GA32141@localhost>
Date: Thu, 23 May 2013 14:26:31 +0200
From: Pablo Neira Ayuso <pablo@...filter.org>
To: Chen Gang <gang.chen@...anux.com>
Cc: kaber@...sh.net, kuznet@....inr.ac.ru, jmorris@...ei.org,
yoshfuji@...ux-ipv6.org, David Miller <davem@...emloft.net>,
netfilter-devel@...r.kernel.org, netfilter@...r.kernel.org,
coreteam@...filter.org, netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH v2] ipv4: netfilter: always let NUL terminated string
ended by '\0'
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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists