xfrm: Refuse to insert 32 bit userspace socket policies on 64 bit systems
authorSteffen Klassert <steffen.klassert@secunet.com>
Thu, 1 Feb 2018 07:49:23 +0000 (08:49 +0100)
committerSteffen Klassert <steffen.klassert@secunet.com>
Fri, 2 Feb 2018 08:23:23 +0000 (09:23 +0100)
commit19d7df69fdb2636856dc8919de72fc1bf8f79598
treeee6305700ada26831ec92f469be4fdb7d4199f4e
parent743ffffefac1c670c6618742c923f6275d819604
xfrm: Refuse to insert 32 bit userspace socket policies on 64 bit systems

We don't have a compat layer for xfrm, so userspace and kernel
structures have different sizes in this case. This results in
a broken configuration, so refuse to configure socket policies
when trying to insert from 32 bit userspace as we do it already
with policies inserted via netlink.

Reported-and-tested-by: syzbot+e1a1577ca8bcb47b769a@syzkaller.appspotmail.com
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_state.c