lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <15787b56-b43d-878d-195b-f8fd54662406@canonical.com>
Date:   Tue, 26 May 2020 19:21:57 +0100
From:   Colin Ian King <colin.king@...onical.com>
To:     Pablo Neira Ayuso <pablo@...filter.org>,
        Jozsef Kadlecsik <kadlec@...filter.org>,
        Florian Westphal <fw@...len.de>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        netfilter-devel@...r.kernel.org, coreteam@...filter.org,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: re: netfilter: nfnetlink_queue: resolve clash for unconfirmed
 conntracks

Hi,

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

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

    netfilter: nfnetlink_queue: resolve clash for unconfirmed conntracks

Namely:

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);
2069

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.

Colin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ