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. Change-Id: Id329af9b31d593a720718d2f20bb8715939ff3cd Fixes: 8913336a ("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> Git-commit: 63364a50 Git-repo: https://android.googlesource.com/kernel/msm Signed-off-by:
Srinivasa Rao Kuppala <srkupp@codeaurora.org>
Loading
Please register or sign in to comment