Re: [PATCH 12/31] netfilter: cttimeout: remove superfluous check on layer 4 netlink functions

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

 



Hi Eric,

On Thu, Nov 01, 2018 at 07:57:26AM -0700, Eric Dumazet wrote:
> On 10/08/2018 04:01 PM, Pablo Neira Ayuso wrote:
[...]
> > @@ -412,21 +406,15 @@ cttimeout_default_fill_info(struct net *net, struct sk_buff *skb, u32 portid,
> >  	    nla_put_u8(skb, CTA_TIMEOUT_L4PROTO, l4proto->l4proto))
> >  		goto nla_put_failure;
> >  
> > -	if (likely(l4proto->ctnl_timeout.obj_to_nlattr)) {
> > -		struct nlattr *nest_parms;
> > -		int ret;
> > -
> > -		nest_parms = nla_nest_start(skb,
> > -					    CTA_TIMEOUT_DATA | NLA_F_NESTED);
> > -		if (!nest_parms)
> > -			goto nla_put_failure;
> > +	nest_parms = nla_nest_start(skb, CTA_TIMEOUT_DATA | NLA_F_NESTED);
> > +	if (!nest_parms)
> > +		goto nla_put_failure;
> >  
> > -		ret = l4proto->ctnl_timeout.obj_to_nlattr(skb, NULL);
> > -		if (ret < 0)
> > -			goto nla_put_failure;
> > +	ret = l4proto->ctnl_timeout.obj_to_nlattr(skb, NULL);
> 
> Hi Pablo
> 
> None of the obj_to_nlattr handlers can handle a NULL pointer.
> What is the intent here ?

It seems this was accidentally set to NULL here.

commit c779e849608a875448f6ffc2a5c2a15523bdcd00
Author: Florian Westphal <fw@xxxxxxxxx>
Date:   Fri Jun 29 07:46:50 2018 +0200

    netfilter: conntrack: remove get_timeout() indirection

Just sent patches to fix this to nf-devel ML.

Thanks for reporting !



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

  Powered by Linux