[lkml]   [2020]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectre: netfilter: nfnetlink_queue: resolve clash for unconfirmed conntracks

Static analysis with Coverity has detected a potential issue with the
commit in linux-next:

commit 368982cd7d1bd41cd39049c794990aca3770db44
Author: Pablo Neira Ayuso <>
Date: Wed May 23 09:17:24 2018 +0200

netfilter: nfnetlink_queue: resolve clash for unconfirmed conntracks


2019 static int __nf_conntrack_update(struct net *net, struct sk_buff *skb,
2020 struct nf_conn *ct)
2021 {
2022 struct nf_conntrack_tuple_hash *h;
2023 struct nf_conntrack_tuple tuple;

1. var_decl: Declaring variable ctinfo without initializer.

2024 enum ip_conntrack_info ctinfo;


2066 nf_ct_put(ct);
2067 ct = nf_ct_tuplehash_to_ctrack(h);

Uninitialized scalar variable (UNINIT)7. uninit_use_in_call:
Using uninitialized value ctinfo when calling nf_ct_set.

2068 nf_ct_set(skb, ct, ctinfo);

the call to nf_ct_set uses info as follows:

316 static inline void
317 nf_ct_set(struct sk_buff *skb, struct nf_conn *ct, enum
ip_conntrack_info info)
318 {
319 skb_set_nfct(skb, (unsigned long)ct | info);
320 }

so this shows that the info arg (from ctinfo) is being used when it has
not been initialized.


 \ /
  Last update: 2020-05-26 20:22    [W:0.029 / U:0.852 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site