]> git.baikalelectronics.ru Git - kernel.git/commit
xfrm: compat: change expression for switch in xfrm_xlate64
authorAnastasia Belova <abelova@astralinux.ru>
Tue, 10 Jan 2023 09:14:50 +0000 (12:14 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Feb 2023 18:11:42 +0000 (19:11 +0100)
commitf22ab58ccce7827d8d92a5504d51dee45a1efd5e
tree8cf9cff50a746c8b8bd889bc8ab947432f3e649e
parentc4d9ec6707a462ea35156c1afd9b898cee178f86
xfrm: compat: change expression for switch in xfrm_xlate64

[ Upstream commit de0ff617382842a724fa7bc1fd84dfdb08ccb2c5 ]

Compare XFRM_MSG_NEWSPDINFO (value from netlink
configuration messages enum) with nlh_src->nlmsg_type
instead of nlh_src->nlmsg_type - XFRM_MSG_BASE.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 485e454b199b ("net/xfrm/compat: Copy xfrm_spdattr_type_t atributes")
Signed-off-by: Anastasia Belova <abelova@astralinux.ru>
Acked-by: Dmitry Safonov <0x7f454c46@gmail.com>
Tested-by: Dmitry Safonov <0x7f454c46@gmail.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/xfrm/xfrm_compat.c