diff options
| author | Lorenzo Bianconi <lorenzo.bianconi@redhat.com> | 2019-04-06 17:16:52 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-04-17 08:38:43 +0200 |
| commit | 5c6f2f4c0e9f91daa436d118a7f5c2142541e4ac (patch) | |
| tree | 57811e779c510a854473d3f1f27b891266e51afe /include/linux/patchkey.h | |
| parent | ecee513a5273b87ac942af435f98f31d8622b415 (diff) | |
net: ip_gre: fix possible use-after-free in erspan_rcv
[ Upstream commit 492b67e28ee5f2a2522fb72e3d3bcb990e461514 ]
erspan tunnels run __iptunnel_pull_header on received skbs to remove
gre and erspan headers. This can determine a possible use-after-free
accessing pkt_md pointer in erspan_rcv since the packet will be 'uncloned'
running pskb_expand_head if it is a cloned gso skb (e.g if the packet has
been sent though a veth device). Fix it resetting pkt_md pointer after
__iptunnel_pull_header
Fixes: 1d7e2ed22f8d ("net: erspan: refactor existing erspan code")
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux/patchkey.h')
0 files changed, 0 insertions, 0 deletions
