]> git.itanic.dy.fi Git - linux-stable/commit
net: openvswitch: ensure LSE is pullable before reading it
authorDavide Caratti <dcaratti@redhat.com>
Thu, 3 Dec 2020 09:46:06 +0000 (10:46 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 3 Dec 2020 19:13:29 +0000 (11:13 -0800)
commit43c13605bad44b8abbc9776d6e63f62ccb7a47d6
treee271b28912c57b1c6d2f232ed4db22b9539a10da
parent13de4ed9e3a9ccbe54d05f7d5c773f69ecaf6c64
net: openvswitch: ensure LSE is pullable before reading it

when openvswitch is configured to mangle the LSE, the current value is
read from the packet dereferencing 4 bytes at mpls_hdr(): ensure that
the label is contained in the skb "linear" area.

Found by code inspection.

Fixes: d27cf5c59a12 ("net: core: add MPLS update core helper and use in OvS")
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Link: https://lore.kernel.org/r/aa099f245d93218b84b5c056b67b6058ccf81a66.1606987185.git.dcaratti@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/openvswitch/actions.c