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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1489119936.28631.28.camel@edumazet-glaptop3.roam.corp.google.com>
Date:   Thu, 09 Mar 2017 20:25:36 -0800
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     Subash Abhinov Kasiviswanathan <subashab@...eaurora.org>
Cc:     netdev@...r.kernel.org,
        Stephen Hemminger <stephen@...workplumber.org>
Subject: Re: [PATCH net-next v2] net: Add sysctl to toggle early demux for
 tcp and udp

On Thu, 2017-03-09 at 20:31 -0700, Subash Abhinov Kasiviswanathan wrote:
> Certain system process significant unconnected UDP workload.
> It would be preferrable to disable UDP early demux for those systems
> and enable it for TCP only.

> +void tcp_v4_early_demux_configure(int enable)
> +{
> +	if (enable)
> +		tcp_protocol.early_demux = tcp_v4_early_demux;
> +	else
> +		tcp_protocol.early_demux = NULL;
> +}
> +
> +void udp_v4_early_demux_configure(int enable)
> +{
> +	if (enable)
> +		udp_protocol.early_demux = udp_v4_early_demux;
> +	else
> +		udp_protocol.early_demux = NULL;
> +}
> +


Well, then you need to make sure ipprot->early_demux is read once in the
callers, like ip_rcv_finish(), otherwise compiler could read it twice
and we could deref a NULL pointer.

ipprot = rcu_dereference(inet_protos[protocol]);
if (ipprot && ipprot->early_demux) {
    ipprot->early_demux(skb);   // crash





Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ