Skip to content
  • Florian Westphal's avatar
    netfilter: nfnetlink_cttimeout: fetch timeouts for udplite and gre, too · 89259088
    Florian Westphal authored
    
    
    syzbot was able to trigger the WARN in cttimeout_default_get() by
    passing UDPLITE as l4protocol.  Alias UDPLITE to UDP, both use
    same timeout values.
    
    Furthermore, also fetch GRE timeouts.  GRE is a bit more complicated,
    as it still can be a module and its netns_proto_gre struct layout isn't
    visible outside of the gre module. Can't move timeouts around, it
    appears conntrack sysctl unregister assumes net_generic() returns
    nf_proto_net, so we get crash. Expose layout of netns_proto_gre instead.
    
    A followup nf-next patch could make gre tracker be built-in as well
    if needed, its not that large.
    
    Last, make the WARN() mention the missing protocol value in case
    anything else is missing.
    
    Reported-by: default avatar <syzbot+2fae8fa157dd92618cae@syzkaller.appspotmail.com>
    Fixes: 8866df92
    
     ("netfilter: nfnetlink_cttimeout: pass default timeout policy to obj_to_nlattr")
    Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
    Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
    89259088