[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20190815.140035.145028724115387751.davem@davemloft.net>
Date: Thu, 15 Aug 2019 14:00:35 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: edumazet@...gle.com
Cc: netdev@...r.kernel.org, eric.dumazet@...il.com,
syzkaller@...glegroups.com
Subject: Re: [PATCH net] net/packet: fix race in tpacket_snd()
From: Eric Dumazet <edumazet@...gle.com>
Date: Wed, 14 Aug 2019 02:11:57 -0700
> packet_sendmsg() checks tx_ring.pg_vec to decide
> if it must call tpacket_snd().
>
> Problem is that the check is lockless, meaning another thread
> can issue a concurrent setsockopt(PACKET_TX_RING ) to flip
> tx_ring.pg_vec back to NULL.
>
> Given that tpacket_snd() grabs pg_vec_lock mutex, we can
> perform the check again to solve the race.
>
> syzbot reported :
...
> Fixes: 69e3c75f4d54 ("net: TX_RING and packet mmap")
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Reported-by: syzbot <syzkaller@...glegroups.com>
Applied and queued up for -stable.
Powered by blists - more mailing lists