diff options
| author | Stefano Brivio <[email protected]> | 2019-06-10 22:27:05 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2019-06-11 19:07:33 +0000 |
| commit | 8399a6930d12f5965230f4ff058228a4cc80c0b9 (patch) | |
| tree | e1efe7f840434d69d3d22d924def0ac30150e5b0 /net/lapb/lapb_iface.c | |
| parent | net: openvswitch: do not free vport if register_netdevice() is failed. (diff) | |
| download | kernel-8399a6930d12f5965230f4ff058228a4cc80c0b9.tar.gz kernel-8399a6930d12f5965230f4ff058228a4cc80c0b9.zip | |
vxlan: Don't assume linear buffers in error handler
In commit c3a43b9fec8a ("vxlan: ICMP error lookup handler") I wrongly
assumed buffers from icmp_socket_deliver() would be linear. This is not
the case: icmp_socket_deliver() only guarantees we have 8 bytes of linear
data.
Eric fixed this same issue for fou and fou6 in commits 26fc181e6cac
("fou, fou6: do not assume linear skbs") and 5355ed6388e2 ("fou, fou6:
avoid uninit-value in gue_err() and gue6_err()").
Use pskb_may_pull() instead of checking skb->len, and take into account
the fact we later access the VXLAN header with udp_hdr(), so we also
need to sum skb_transport_header() here.
Reported-by: Guillaume Nault <[email protected]>
Fixes: c3a43b9fec8a ("vxlan: ICMP error lookup handler")
Signed-off-by: Stefano Brivio <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/lapb/lapb_iface.c')
0 files changed, 0 insertions, 0 deletions
