pull request (net): ipsec 2016-12-01
Subsystems (3)
Steffen Klassert
maintainerPATCH 1/3 xfrm_user: fix return value from xfrm_user_rcv_msg
In reply to Steffen KlassertFrom: Yi Zhao <[email protected]>
It doesn't support to run 32bit 'ip' to set xfrm objdect on 64bit host. But the return value is unknown for user program:
ip xfrm policy list
RTNETLINK answers: Unknown error 524
Replace ENOTSUPP with EOPNOTSUPP:
ip xfrm policy list
RTNETLINK answers: Operation not supported
--- net/xfrm/xfrm_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/xfrm/xfrm_user.c +1 -1
@@ -2450,7 +2450,7 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)#ifdef CONFIG_COMPAT if (in_compat_syscall ()) -return -ENOTSUPP ; +return -EOPNOTSUPP ;#endif type = nlh->nlmsg_type;
Signature · 1 line
1.9.1
Steffen Klassert
maintainerPATCH 2/3 esp4: Fix integrity verification when ESN are used
In reply to Steffen KlassertFrom: Tobias Brunner <[email protected]>
When handling inbound packets, the two halves of the sequence number stored on the skb are already in network order.
--- net/ipv4/esp4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/esp4.c +1 -1
@@ -476,7 +476,7 @@ static int esp_input(struct xfrm_state *x, struct sk_buff *skb) esph = (void *)skb_push (skb,4 ); *seqhi = esph->spi; esph->spi = esph->seq_no; - esph->seq_no =htonl (XFRM_SKB_CB (skb)->seq.input.hi); + esph->seq_no =XFRM_SKB_CB (skb)->seq.input.hi;aead_request_set_callback (req,0 , esp_input_done_esn, skb); }
Signature · 1 line
1.9.1
Steffen Klassert
maintainer1) Change the error value when someone tries to run 32bit userspace on a 64bit host from -ENOTSUPP to the userspace exported -EOPNOTSUPP. Fix from Yi Zhao.
2) On inbound, ESN sequence numbers are already in network byte order. So don't try to convert it again, this fixes integrity verification for ESN. Fixes from Tobias Brunner.
Please pull or let me know if there are problems.
Thanks!
The following changes since commit f2ebf2a6ca94e78be179e8c99d34c87efc5e8bfb:
Merge branch 'fixed-phy-phydev-leaks' (2016-11-29 23:17:04 -0500)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec.git master
for you to fetch changes up to a55e23864d381c5a4ef110df94b00b2fe121a70d:
esp6: Fix integrity verification when ESN are used (2016-11-30 11:10:16 +0100)
----------------------------------------------------------------
Tobias Brunner (2):
esp4: Fix integrity verification when ESN are used
esp6: Fix integrity verification when ESN are used
Yi Zhao (1):
xfrm_user: fix return value from xfrm_user_rcv_msg
net/ipv4/esp4.c | 2 +- net/ipv6/esp6.c | 2 +- net/xfrm/xfrm_user.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
Steffen Klassert
maintainerPATCH 3/3 esp6: Fix integrity verification when ESN are used
From: Tobias Brunner <[email protected]>
When handling inbound packets, the two halves of the sequence number stored on the skb are already in network order.
--- net/ipv6/esp6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv6/esp6.c +1 -1
@@ -418,7 +418,7 @@ static int esp6_input(struct xfrm_state *x, struct sk_buff *skb) esph = (void *)skb_push (skb,4 ); *seqhi = esph->spi; esph->spi = esph->seq_no; - esph->seq_no =htonl (XFRM_SKB_CB (skb)->seq.input.hi); + esph->seq_no =XFRM_SKB_CB (skb)->seq.input.hi;aead_request_set_callback (req,0 , esp_input_done_esn, skb); }
Signature · 1 line
1.9.1
David Miller
maintainerFrom: Steffen Klassert <[email protected]>
Date: Thu, 1 Dec 2016 12:44:49 +0100
Quoted 9 lines
1) Change the error value when someone tries to run 32bit userspace on a 64bit host from
-ENOTSUPPto the userspace exported-EOPNOTSUPP. Fix from Yi Zhao.2) On inbound, ESN sequence numbers are already in network byte order. So don't try to convert it again, this fixes integrity verification for ESN. Fixes from Tobias Brunner.
Please pull or let me know if there are problems.
Pulled, thanks Steffen.