]> git.baikalelectronics.ru Git - kernel.git/commit
xfrm: fix null pointer dereference on state and tmpl sort
authorKoichiro Den <den@klaipeden.com>
Tue, 1 Aug 2017 14:21:46 +0000 (23:21 +0900)
committerSteffen Klassert <steffen.klassert@secunet.com>
Wed, 2 Aug 2017 11:37:37 +0000 (13:37 +0200)
commit1b3169bd425d593fabb5ae090be231a7dc8e48ec
treeb455549c1a6116277a7aa50f5ea2b7e761cc54c9
parent1276c2f2464a1d4f86405f9ca412d395064a1a1b
xfrm: fix null pointer dereference on state and tmpl sort

Creating sub policy that matches the same outer flow as main policy does
leads to a null pointer dereference if the outer mode's family is ipv4.
For userspace compatibility, this patch just eliminates the crash i.e.,
does not introduce any new sorting rule, which would fruitlessly affect
all but the aforementioned case.

Signed-off-by: Koichiro Den <den@klaipeden.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_state.c