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]
Date:	Wed, 1 Jul 2015 23:49:25 +0200
From:	Eric Dumazet <edumazet@...gle.com>
To:	David Miller <davem@...emloft.net>
Cc:	agartrell@...com, netdev <netdev@...r.kernel.org>,
	kernel-team <kernel-team@...com>
Subject: Re: [PATCH net-next] net: bail on sock_wfree, sock_rfree when we have
 a TCP_TIMEWAIT sk

On Wed, Jul 1, 2015 at 11:14 PM, David Miller <davem@...emloft.net> wrote:
> From: Alex Gartrell <agartrell@...com>
> Date: Wed, 1 Jul 2015 13:13:09 -0700
>
>> If we early-demux bind a TCP_TIMEWAIT socket to an skb and then orphan it
>> (as we need to do in the ipvs forwarding case), sock_wfree and sock_rfree
>> are going to reach into the inet_timewait_sock and mess with fields that
>> don't exist.
>>
>> Signed-off-by: Alex Gartrell <agartrell@...com>
>
> If we're forwarding, we should not find a local socket, period.
>
> We should only match sockets for locally destined packets.
>
> So I'd say that the state in which you say this can occur is illegal.

Right, this patch is totally buggy.

A socket cannot change state to TCP_TIMEWAIT.

A new object is allocated and old one is removed from ehash, then
freed (rcu rules being applied)

Also sock_wfree() has nothing to do with early demux. It is for output
path skbs only.
--
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