From: David S. Miller Date: Tue, 21 Mar 2006 06:23:35 +0000 (-0800) Subject: [IPSEC] xfrm_user: Kill PAGE_SIZE check in verify_sec_ctx_len() X-Git-Tag: v2.6.17-rc1~1175^2~89 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=253aa11578c1b89757282430891bb66ae5300092;p=linux-2.6 [IPSEC] xfrm_user: Kill PAGE_SIZE check in verify_sec_ctx_len() 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 --- diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index 07b71680cd..7b1acd9951 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c @@ -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;