xen/netfront: harden netfront against event channel storms
authorJuergen Gross <jgross@suse.com>
Thu, 16 Dec 2021 07:24:08 +0000 (08:24 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Dec 2021 08:30:59 +0000 (09:30 +0100)
commitd31b3379179d64724d3bbfa87bd4ada94e3237de
tree5e86615e5b46d9d3fa021350b51019a371b75ba9
parent8ac3b6ee7c9ff2df7c99624bb1235e2e55623825
xen/netfront: harden netfront against event channel storms

commit b27d47950e481f292c0a5ad57357edb9d95d03ba upstream.

The Xen netfront driver is still vulnerable for an attack via excessive
number of events sent by the backend. Fix that by using lateeoi event
channels.

For being able to detect the case of no rx responses being added while
the carrier is down a new lock is needed in order to update and test
rsp_cons and the number of seen unconsumed responses atomically.

This is part of XSA-391

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/xen-netfront.c