linux-stable/net/xfrm
Steffen Klassert 5f33f7fde2 xfrm: Fix error reporting in xfrm_state_construct.
[ Upstream commit 6fd06963fa ]

When memory allocation for XFRMA_ENCAP or XFRMA_COADDR fails,
the error will not be reported because the -ENOMEM assignment
to the err variable is overwritten before. Fix this by moving
these two in front of the function so that memory allocation
failures will be reported.

Reported-by: Tobias Brunner <tobias@strongswan.org>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-07-20 16:17:44 +02:00
..
Kconfig ipsec: select crypto ciphers for xfrm_algo 2019-07-31 07:28:27 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xfrm_algo.c
xfrm_device.c xfrm: handle NETDEV_UNREGISTER for xfrm device 2020-04-02 16:34:31 +02:00
xfrm_hash.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xfrm_hash.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xfrm_input.c xfrm: Fix oops in xfrm_replay_advance_bmp 2021-02-03 23:22:22 +01:00
xfrm_ipcomp.c net: xfrm: use preempt-safe this_cpu_read() in ipcomp_alloc_tfms() 2018-04-08 14:26:29 +02:00
xfrm_output.c xfrm: fix a NULL-ptr deref in xfrm_local_error 2020-06-03 08:18:06 +02:00
xfrm_policy.c xfrm: fix a warning in xfrm_policy_insert_list 2020-06-03 08:18:06 +02:00
xfrm_proc.c
xfrm_replay.c xfrm: Fix ESN sequence number handling for IPsec GSO packets. 2018-05-30 07:52:08 +02:00
xfrm_state.c net: xfrm: fix a race condition during allocing spi 2020-11-18 18:27:53 +01:00
xfrm_sysctl.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xfrm_user.c xfrm: Fix error reporting in xfrm_state_construct. 2021-07-20 16:17:44 +02:00