summaryrefslogtreecommitdiff
path: root/include/net/xfrm.h
diff options
context:
space:
mode:
authorSabrina Dubroca <sd@queasysnail.net>2019-03-25 14:30:00 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-25 18:22:22 +0200
commitff7fa2c801bce4920ef75741283364b133728e8c (patch)
tree6798c17e2a950f52313437def1ce35df2b4e6a81 /include/net/xfrm.h
parent4e8ce2680442d924c7b267fded16967c33b0e87c (diff)
esp4: add length check for UDP encapsulation
[ Upstream commit 8dfb4eba4100e7cdd161a8baef2d8d61b7a7e62e ] esp_output_udp_encap can produce a length that doesn't fit in the 16 bits of a UDP header's length field. In that case, we'll send a fragmented packet whose length is larger than IP_MAX_MTU (resulting in "Oversized IP packet" warnings on receive) and with a bogus UDP length. To prevent this, add a length check to esp_output_udp_encap and return -EMSGSIZE on failure. This seems to be older than git history. Signed-off-by: Sabrina Dubroca <sd@queasysnail.net> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/net/xfrm.h')
0 files changed, 0 insertions, 0 deletions