소스 검색

[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 <davem@davemloft.net>
David S. Miller 20 년 전
부모
커밋
253aa11578
1개의 변경된 파일0개의 추가작업 그리고 3개의 파일을 삭제
  1. 0 3
      net/xfrm/xfrm_user.c

+ 0 - 3
net/xfrm/xfrm_user.c

@@ -101,9 +101,6 @@ static inline int verify_sec_ctx_len(struct rtattr **xfrma)
 
 
 	uctx = RTA_DATA(rt);
 	uctx = RTA_DATA(rt);
 
 
-	if (uctx->ctx_len > PAGE_SIZE)
-		return -EINVAL;
-
 	len += sizeof(struct xfrm_user_sec_ctx);
 	len += sizeof(struct xfrm_user_sec_ctx);
 	len += uctx->ctx_len;
 	len += uctx->ctx_len;