Message ID | 001a1143d39cd6764b056435fc03@google.com |
---|---|
State | RFC, archived |
Delegated to: | David Miller |
Headers | show |
Series | KASAN: stack-out-of-bounds Read in xfrm_state_find (4) | expand |
--- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c @@ -2056,6 +2056,11 @@ int xfrm_user_policy(struct sock *sk, int optname, u8 __user *optval, int optlen struct xfrm_mgr *km; struct xfrm_policy *pol = NULL; +#ifdef CONFIG_COMPAT + if (in_compat_syscall()) + return -EOPNOTSUPP; +#endif + if (optlen <= 0 || optlen > PAGE_SIZE) return -EMSGSIZE;