Re: [PATCH] ipv4: netfilter: always let NUL terminated string ended by '\0'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/23/2013 07:08 PM, Pablo Neira Ayuso wrote:
> On Fri, May 17, 2013 at 04:39:15PM +0800, Chen Gang wrote:
>> > 
>> > For NUL terminated string, better always be sure of ended by '\0'.
>> > 
>> > '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.
> loginfo->prefix is always nul-terminated, as this is validated in
> checkentry. I don't think the kernel will take a non nul-terminated
> device name either.
> 
> 

Really it is.

And 'prefix' max length is 128 (NF_LOG_PREFIXLEN), and 'pm->prefix' max
length is 32 (ULOG_PREFIX_LEN), so we still need this patch, but need
improved.

So I should send patch v2.


Thanks.
-- 
Chen Gang

Asianux Corporation
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux