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>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170918153347.GA28198@salvia>
Date:   Mon, 18 Sep 2017 17:33:47 +0200
From:   Pablo Neira Ayuso <pablo@...filter.org>
To:     Geert Uytterhoeven <geert@...ux-m68k.org>
Cc:     Jozsef Kadlecsik <kadlec@...ckhole.kfki.hu>,
        Florian Westphal <fw@...len.de>,
        "David S . Miller" <davem@...emloft.net>,
        Arnd Bergmann <arnd@...db.de>, netfilter-devel@...r.kernel.org,
        coreteam@...filter.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] netfilter: nat: Do not use ARRAY_SIZE() on spinlocks to
 fix zero div

On Sun, Sep 10, 2017 at 01:41:41PM +0200, Geert Uytterhoeven wrote:
> If no spinlock debugging options (CONFIG_GENERIC_LOCKBREAK,
> CONFIG_DEBUG_SPINLOCK, CONFIG_DEBUG_LOCK_ALLOC) are enabled on a UP
> platform (e.g. m68k defconfig), arch_spinlock_t is an empty struct,
> hence using ARRAY_SIZE(nf_nat_locks) causes a division by zero:
> 
>     net/netfilter/nf_nat_core.c: In function ‘nf_nat_setup_info’:
>     net/netfilter/nf_nat_core.c:432: warning: division by zero
>     net/netfilter/nf_nat_core.c: In function ‘__nf_nat_cleanup_conntrack’:
>     net/netfilter/nf_nat_core.c:535: warning: division by zero
>     net/netfilter/nf_nat_core.c:537: warning: division by zero
>     net/netfilter/nf_nat_core.c: In function ‘nf_nat_init’:
>     net/netfilter/nf_nat_core.c:810: warning: division by zero
>     net/netfilter/nf_nat_core.c:811: warning: division by zero
>     net/netfilter/nf_nat_core.c:824: warning: division by zero
> 
> Fix this by using the CONNTRACK_LOCKS definition instead.

Applied.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ