Cipso: cipso_v4_optptr enter infinite loop
authoryujuan.qi <yujuan.qi@mediatek.com>
Mon, 31 Jul 2017 03:23:01 +0000 (11:23 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Aug 2017 22:31:23 +0000 (15:31 -0700)
commit40413955ee265a5e42f710940ec78f5450d49149
treee2e0c22b0f753899a3c190581bbbf6d392bc8a0b
parentfdaa419bb24cc191f2dce2ec19af1ef7c5076a36
Cipso: cipso_v4_optptr enter infinite loop

in for(),if((optlen > 0) && (optptr[1] == 0)), enter infinite loop.

Test: receive a packet which the ip length > 20 and the first byte of ip option is 0, produce this issue

Signed-off-by: yujuan.qi <yujuan.qi@mediatek.com>
Acked-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/cipso_ipv4.c