]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
netfilter: conntrack: Pass value of ctinfo to __nf_conntrack_update
authorNathan Chancellor <natechancellor@gmail.com>
Wed, 27 May 2020 08:10:39 +0000 (01:10 -0700)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Mon, 22 Jun 2020 20:23:46 +0000 (17:23 -0300)
commit3f021c5c42884ad7e16faa02c5484a02e59af09a
tree0e7ac62225ba83e4319482b841570915663937bf
parent4e94c54ad1f7b62ed87d60cb9f08e040c425d676
netfilter: conntrack: Pass value of ctinfo to __nf_conntrack_update

BugLink: https://bugs.launchpad.net/bugs/1881927
commit 46c1e0621a72e0469ec4edfdb6ed4d387ec34f8a upstream.

Clang warns:

net/netfilter/nf_conntrack_core.c:2068:21: warning: variable 'ctinfo' is
uninitialized when used here [-Wuninitialized]
        nf_ct_set(skb, ct, ctinfo);
                           ^~~~~~
net/netfilter/nf_conntrack_core.c:2024:2: note: variable 'ctinfo' is
declared here
        enum ip_conntrack_info ctinfo;
        ^
1 warning generated.

nf_conntrack_update was split up into nf_conntrack_update and
__nf_conntrack_update, where the assignment of ctinfo is in
nf_conntrack_update but it is used in __nf_conntrack_update.

Pass the value of ctinfo from nf_conntrack_update to
__nf_conntrack_update so that uninitialized memory is not used
and everything works properly.

Fixes: ee04805ff54a ("netfilter: conntrack: make conntrack userspace helpers work again")
Link: https://github.com/ClangBuiltLinux/linux/issues/1039
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
net/netfilter/nf_conntrack_core.c