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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGK4HS-h77PGp--hvFOPEPJu0ru5uz_K_Aqjo8k2hO=VWBr7Eg@mail.gmail.com>
Date:	Sun, 27 Jan 2013 21:02:31 -0800
From:	Vijay Subramanian <subramanian.vijay@...il.com>
To:	Nivedita Singhvi <niveditasinghvi@...il.com>
Cc:	netdev@...r.kernel.org, David Miller <davem@...emloft.net>,
	Nivedita Singhvi <niv@...ibm.com>
Subject: Re: [PATCH] [PATCH] tcp: Increment of LINUX_MIB_LISTENOVERFLOWS in
 tcp_v4_conn_request() (updated)

On 27 January 2013 18:01, Vijay Subramanian <subramanian.vijay@...il.com> wrote:
> On 27 January 2013 17:45, Nivedita Singhvi <niveditasinghvi@...il.com> wrote:
>> From: Nivedita Singhvi <niv@...ibm.com>
>>
>> We drop a connection request if the accept backlog is full and there are
>> sufficient packets in the syn queue to warrant starting drops. Increment the
>> appropriate counter so this isn't silent, for accurate stats and help in
>> debugging.
>>
>> Signed-off-by: Nivedita Singhvi <niv@...ibm.com>
>

The patch is ok but I think we missed something. Please consider the
following in
tcp_v4_syn_recv_sock()

exit_overflow:
        NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_LISTENOVERFLOWS);
exit_nonewsk:
        dst_release(dst);
exit:
        NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_LISTENDROPS);
        return NULL;
put_and_exit:
        inet_csk_prepare_forced_close(newsk);
        tcp_done(newsk);
        goto exit;


When ListenOverflows is incremented, so is ListenDrops. This is
because overflows is one of  several reasons why a SYN can be dropped
by a socket in LISTEN state. When we increment ListenOverflows, we
should also increment ListenDrops.

So we also need
NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_LISTENDROPS);

Would you mind updating this?  (If you want me to do it as I acked the
patch, let me know.)

Thanks,
Vijay
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ