From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753315AbdBIPMz (ORCPT ); Thu, 9 Feb 2017 10:12:55 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:40718 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753293AbdBIPMx (ORCPT ); Thu, 9 Feb 2017 10:12:53 -0500 Date: Thu, 9 Feb 2017 07:12:20 -0800 From: Sowmini Varadhan To: Dmitry Vyukov Cc: David Miller , Willem de Bruijn , Eric Dumazet , Daniel Borkmann , jarno@ovn.org, philip.pettersson@gmail.com, weongyo.linux@gmail.com, netdev , LKML , syzkaller Subject: Re: net/packet: use-after-free in packet_rcv_fanout Message-ID: <20170209151220.GA4843@oracle.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (02/09/17 14:14), Dmitry Vyukov wrote: > > Call Trace: : > packet_rcv_has_room+0x25/0xb0 net/packet/af_packet.c:1308 > fanout_demux_rollover+0x3bb/0x6b0 net/packet/af_packet.c:1388 > packet_rcv_fanout+0x674/0x800 net/packet/af_packet.c:1490 > dev_queue_xmit_nit+0x73a/0xa90 net/core/dev.c:1898 : > tcp_sendmsg_fastopen net/ipv4/tcp.c:1110 [inline] : looks like a race between a NIT socket (tcpdump, maybe?) that is closing, and a standard tcp socket.. packet_release() takes the po->bind_lock to remove the socket from the ptype_all NIT queue. but how does that sync with the Tx path for other af_inet/af_inet6 sockets? --Sowmini