]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
[IPSEC] xfrm_user: Kill PAGE_SIZE check in verify_sec_ctx_len()
authorDavid S. Miller <davem@davemloft.net>
Tue, 21 Mar 2006 06:23:35 +0000 (22:23 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Mar 2006 06:23:35 +0000 (22:23 -0800)
First, it warns when PAGE_SIZE >= 64K because the ctx_len
field is 16-bits.

Secondly, if there are any real length limitations it can
be verified by the security layer security_xfrm_state_alloc()
call.

Signed-off-by: David S. Miller <davem@davemloft.net>
net/xfrm/xfrm_user.c

index 07b71680cde0d4c574c0c133fb50beeff258de80..7b1acd995168b94af410c5f2e1f8a0f3e7c6f7cd 100644 (file)
@@ -101,9 +101,6 @@ static inline int verify_sec_ctx_len(struct rtattr **xfrma)
 
        uctx = RTA_DATA(rt);
 
-       if (uctx->ctx_len > PAGE_SIZE)
-               return -EINVAL;
-
        len += sizeof(struct xfrm_user_sec_ctx);
        len += uctx->ctx_len;