diff options
author | Alexey Kodanev <alexey.kodanev@oracle.com> | 2016-08-10 13:54:57 +0300 |
---|---|---|
committer | Steffen Klassert <steffen.klassert@secunet.com> | 2016-08-11 13:15:57 +0200 |
commit | 1625f4529957738be7d87cf157e107b8fb9d23b9 (patch) | |
tree | e65c8b228135216df2f5b6e77c6e54a2976e3ec9 /firmware/qlogic | |
parent | 6916fb3b10b3cbe3b1f9f5b680675f53e4e299eb (diff) | |
download | linux-1625f4529957738be7d87cf157e107b8fb9d23b9.tar.bz2 |
net/xfrm_input: fix possible NULL deref of tunnel.ip6->parms.i_key
Running LTP 'icmp-uni-basic.sh -6 -p ipcomp -m tunnel' test over
openvswitch + veth can trigger kernel panic:
BUG: unable to handle kernel NULL pointer dereference
at 00000000000000e0 IP: [<ffffffff8169d1d2>] xfrm_input+0x82/0x750
...
[<ffffffff816d472e>] xfrm6_rcv_spi+0x1e/0x20
[<ffffffffa082c3c2>] xfrm6_tunnel_rcv+0x42/0x50 [xfrm6_tunnel]
[<ffffffffa082727e>] tunnel6_rcv+0x3e/0x8c [tunnel6]
[<ffffffff8169f365>] ip6_input_finish+0xd5/0x430
[<ffffffff8169fc53>] ip6_input+0x33/0x90
[<ffffffff8169f1d5>] ip6_rcv_finish+0xa5/0xb0
...
It seems that tunnel.ip6 can have garbage values and also dereferenced
without a proper check, only tunnel.ip4 is being verified. Fix it by
adding one more if block for AF_INET6 and initialize tunnel.ip6 with NULL
inside xfrm6_rcv_spi() (which is similar to xfrm4_rcv_spi()).
Fixes: 049f8e2 ("xfrm: Override skb->mark with tunnel->parm.i_key in xfrm_input")
Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'firmware/qlogic')
0 files changed, 0 insertions, 0 deletions