lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 13 Jun 2016 11:48:14 +1200
From:	Blair Steven <blair.steven@...iedtelesis.co.nz>
To:	netdev@...r.kernel.org
Cc:	Blair Steven <blair.steven@...iedtelesis.co.nz>
Subject: [PATCH] esp: correct offset for ESN when using NAT-T

The offset for calculating ESN was not taking into account the new UDP
header created for NAT-T.
---
 net/ipv4/esp4.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c
index 4779374..c84d1fc 100644
--- a/net/ipv4/esp4.c
+++ b/net/ipv4/esp4.c
@@ -223,6 +223,8 @@ static int esp_output(struct xfrm_state *x, struct sk_buff *skb)
 		uh->len = htons(skb->len - skb_transport_offset(skb));
 		uh->check = 0;
 
+		skb_set_transport_header(skb, skb_transport_offset(skb) + sizeof(struct udphdr));
+
 		switch (encap_type) {
 		default:
 		case UDP_ENCAP_ESPINUDP:
-- 
2.8.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ