]> git.baikalelectronics.ru Git - kernel.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>
Wed, 13 Sep 2023 07:42:24 +0000 (09:42 +0200)
commit179b9b062fe8ef4d674e5772598b36396b871060
treedfa9c27f070de487ce1fb3a4378b10a63cc5e643
parent78ef22febd68aafdef98ae3eb458958c1910ad27
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