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: <20180502.133519.1791531193097089172.davem@davemloft.net>
Date:   Wed, 02 May 2018 13:35:19 -0400 (EDT)
From:   David Miller <davem@...emloft.net>
To:     stephen@...workplumber.org
Cc:     netdev@...r.kernel.org, sthemmin@...rosoft.com
Subject: Re: [RFC] inet: add bound ports statistic

From: Stephen Hemminger <stephen@...workplumber.org>
Date: Wed,  2 May 2018 10:25:31 -0700

> diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
> index 881ac6d046f2..8a70465c240c 100644
> --- a/net/ipv4/inet_connection_sock.c
> +++ b/net/ipv4/inet_connection_sock.c
> @@ -309,6 +309,7 @@ int inet_csk_get_port(struct sock *sk, unsigned short snum)
>  				     net, head, port);
>  	if (!tb)
>  		goto fail_unlock;
> +	++head->count;
>  tb_found:
>  	if (!hlist_empty(&tb->owners)) {
>  		if (sk->sk_reuse == SK_FORCE_REUSE)

Are you really able to commit to the counter increment here?  We can still
fail after this point.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ