]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - net/xfrm/xfrm_user.c
xfrm: check user specified spi for IPComp
[mirror_ubuntu-bionic-kernel.git] / net / xfrm / xfrm_user.c
index 16c84608e81efc881adec9effdacc32f389a11ed..4027c4266a879b609a661fc6d53b6ad33a951dfd 100644 (file)
@@ -181,7 +181,9 @@ static int verify_newsa_info(struct xfrm_usersa_info *p,
                    attrs[XFRMA_ALG_AEAD]       ||
                    attrs[XFRMA_ALG_CRYPT]      ||
                    attrs[XFRMA_ALG_COMP]       ||
-                   attrs[XFRMA_TFCPAD])
+                   attrs[XFRMA_TFCPAD]         ||
+                   (ntohl(p->id.spi) >= 0x10000))
+
                        goto out;
                break;