https://source.android.com/security/bulletin/2018-03-01
CVE-2016-8405
CVE-2017-13216
CVE-2017-17770
CVE-2017-15129
CVE-2017-16530
CVE-2017-16525
CVE-2017-5754
CVE-2017-16535
CVE-2017-16533
CVE-2017-16531
CVE-2017-16529
packet: fix tp_reserve race in packet_set_ring


[ Upstream commit c27927e372f0785f3303e8fad94b85945e2c97b7 ]

Updates to tp_reserve can race with reads of the field in
packet_set_ring. Avoid this by holding the socket lock during
updates in setsockopt PACKET_RESERVE.

This bug was discovered by syzkaller.

Fixes: 8913336a7e8d ("packet: add PACKET_RESERVE sockopt")
Reported-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 file changed