]> git.baikalelectronics.ru Git - kernel.git/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)
commitafb28c606570cff734a67d59f9783c6ab277ab7e
treee271b28912c57b1c6d2f232ed4db22b9539a10da
parent7ec600e78bf468646f5259511bd0e22f3276de18
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: 77cd1ce78f33 ("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