]> git.baikalelectronics.ru Git - kernel.git/commit
xfrm: Fix crash when the hold queue is used.
authorSteffen Klassert <steffen.klassert@secunet.com>
Fri, 17 Jul 2020 08:34:27 +0000 (10:34 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Tue, 21 Jul 2020 06:33:56 +0000 (08:33 +0200)
commitc0d0167fc0818673511258e7ac79ad28dff44e7c
tree8a36358a1e3983731cfc0858cadd8b7d9020e903
parentaff9ce6c6fd649c909d547203407bb1e85931638
xfrm: Fix crash when the hold queue is used.

The commits "xfrm: Move dst->path into struct xfrm_dst"
and "net: Create and use new helper xfrm_dst_child()."
changed xfrm bundle handling under the assumption
that xdst->path and dst->child are not a NULL pointer
only if dst->xfrm is not a NULL pointer. That is true
with one exception. If the xfrm hold queue is used
to wait until a SA is installed by the key manager,
we create a dummy bundle without a valid dst->xfrm
pointer. The current xfrm bundle handling crashes
in that case. Fix this by extending the NULL check
of dst->xfrm with a test of the DST_XFRM_QUEUE flag.

Fixes: e742e9aed5cd ("xfrm: Move dst->path into struct xfrm_dst")
Fixes: 4e103c59e6fd ("net: Create and use new helper xfrm_dst_child().")
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
include/net/xfrm.h