Skip to content
Commit 67d349ed authored by Ilan Tayari's avatar Ilan Tayari Committed by David S. Miller
Browse files

net/esp4: Fix invalid esph pointer crash

Both esp_output and esp_xmit take a pointer to the ESP header
and place it in esp_info struct prior to calling esp_output_head.

Inside esp_output_head, the call to esp_output_udp_encap
makes sure to update the pointer if it gets invalid.
However, if esp_output_head itself calls skb_cow_data, the
pointer is not updated and stays invalid, causing a crash
after esp_output_head returns.

Update the pointer if it becomes invalid in esp_output_head

Fixes: fca11ebd

 ("esp4: Reorganize esp_output")
Signed-off-by: default avatarIlan Tayari <ilant@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 89a23c8b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment