Re: [PATCH nf-next] netfilter: move nf_tables base hook annotation to init helper

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

 



On Tue, Jun 08, 2021 at 11:06:07PM +0200, Florian Westphal wrote:
> coverity scanner says:
> 2187  if (nft_is_base_chain(chain)) {
> vvv   CID 1505166:  Memory - corruptions  (UNINIT)
> vvv   Using uninitialized value "basechain".
> 2188  basechain->ops.hook_ops_type = NF_HOOK_OP_NF_TABLES;
> 
> ... I don't see how nft_is_base_chain() can evaluate to true
> while basechain pointer is garbage.
> 
> However, it seems better to place the NF_HOOK_OP_NF_TABLES annotation
> in nft_basechain_hook_init() instead.

Applied, thanks.



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux