]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
netlabel: fix shift wrapping bug in netlbl_catmap_setlong()
authorDmitry Mastykin <dmastykin@astralinux.ru>
Thu, 8 Jun 2023 13:57:54 +0000 (16:57 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Sep 2023 08:46:53 +0000 (10:46 +0200)
commit8ac8a7017e39515aff7de426241bebd4c41d8133
tree1890a441bd4359b3b0031ec329dbfcb9a5a6286d
parente89ac572c3d554dbc04e70b91cbf2bbd1c5c984d
netlabel: fix shift wrapping bug in netlbl_catmap_setlong()

[ Upstream commit b403643d154d15176b060b82f7fc605210033edd ]

There is a shift wrapping bug in this code on 32-bit architectures.
NETLBL_CATMAP_MAPTYPE is u64, bitmap is unsigned long.
Every second 32-bit word of catmap becomes corrupted.

Signed-off-by: Dmitry Mastykin <dmastykin@astralinux.ru>
Acked-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netlabel/netlabel_kapi.c