pull request (net-next): ipsec-next 2015-04-09
Subsystems (3)
Steffen Klassert
maintainer1) Prohibit the use/abuse of the xfrm netlink interface on 32/64 bit compatibility tasks. We need a full compat layer before we can allow this. From Fan Du.
Please pull or let me know if there are problems.
Thanks!
The following changes since commit b898441f4ece44933af90b116b467f7864dd1ae7:
Merge branch 'neigh_cleanups' (2015-03-02 16:43:46 -0500)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next.git master
for you to fetch changes up to 74005991b78a0a7a6546004fb37d33a651c613e7:
xfrm: Do not parse 32bits compiled xfrm netlink msg on 64bits host (2015-03-03 10:10:16 +0100)
----------------------------------------------------------------
Fan Du (1):
xfrm: Do not parse 32bits compiled xfrm netlink msg on 64bits host
net/xfrm/xfrm_user.c | 5 +++++ 1 file changed, 5 insertions(+)
Steffen Klassert
maintainerPATCH 1/1 xfrm: Do not parse 32bits compiled xfrm netlink msg on 64bits host
From: Fan Du <[email protected]>
structure like xfrm_usersa_info or xfrm_userpolicy_info has different sizeof when compiled as 32bits and 64bits due to not appending pack attribute in their definition. This will result in broken SA and SP information when user trying to configure them through netlink interface.
Inform user land about this situation instead of keeping silent, the upper test scripts would behave accordingly.
--- net/xfrm/xfrm_user.c | 5 +++++ 1 file changed, 5 insertions(+)
net/xfrm/xfrm_user.c +5 -0
@@ -2423,6 +2423,11 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)const struct xfrm_link *link;int type, err; +#ifdef CONFIG_COMPAT +if (is_compat_task ()) +return -ENOTSUPP ; +#endif + type = nlh->nlmsg_type;if (type >XFRM_MSG_MAX )return -EINVAL ;
Signature · 1 line
1.9.1
David Miller
maintainerFrom: Steffen Klassert <[email protected]>
Date: Thu, 9 Apr 2015 12:33:07 +0200
Quoted 5 lines
1) Prohibit the use/abuse of the xfrm netlink interface on 32/64 bit compatibility tasks. We need a full compat layer before we can allow this. From Fan Du.
Please pull or let me know if there are problems.
Pulled, thanks Steffen.
This is fine as a short term fix, but long term we should translate these data structures.