af_key: Do not call xfrm_probe_algs in parallel
[ Upstream commit ba953a9d89a00c078b85f4b190bc1dde66fe16b5 ]
When namespace support was added to xfrm/afkey, it caused the
previously single-threaded call to xfrm_probe_algs to become
multi-threaded. This is buggy and needs to be fixed with a mutex.
RELEASE_NOTE=Fixed CVE-2022-3028 in the Linux kernel.
Reported-by: Abhishek Shah <firstname.lastname@example.org>
Fixes: 283bc9f35bbb ("xfrm: Namespacify xfrm state/policy locks")
Signed-off-by: Herbert Xu <email@example.com>
Signed-off-by: Steffen Klassert <firstname.lastname@example.org>
Signed-off-by: Sasha Levin <email@example.com>
Tested-by: Cusky Presubmit Bot <firstname.lastname@example.org>
Reviewed-by: Robert Kolchmeyer <email@example.com>
1 file changed