linux-stable/security/apparmor
Ryan Lee 69e83e5527 apparmor: ensure WB_HISTORY_SIZE value is a power of 2
[ Upstream commit 6c055e6256 ]

WB_HISTORY_SIZE was defined to be a value not a power of 2, despite a
comment in the declaration of struct match_workbuf stating it is and a
modular arithmetic usage in the inc_wb_pos macro assuming that it is. Bump
WB_HISTORY_SIZE's value up to 32 and add a BUILD_BUG_ON_NOT_POWER_OF_2
line to ensure that any future changes to the value of WB_HISTORY_SIZE
respect this requirement.

Fixes: 136db99485 ("apparmor: increase left match history buffer size")

Signed-off-by: Ryan Lee <ryan.lee@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-08-28 16:24:11 +02:00
..
include apparmor: ensure WB_HISTORY_SIZE value is a power of 2 2025-08-28 16:24:11 +02:00
.gitignore
apparmorfs.c apparmor: fix possible NULL pointer dereference 2024-09-12 11:07:40 +02:00
audit.c
capability.c apparmor: fix 'Do simple duplicate message elimination' 2024-12-14 19:51:11 +01:00
crypto.c
domain.c
file.c
ipc.c
Kconfig
label.c
lib.c
lsm.c apparmor: Fix null pointer deref when receiving skb during sock creation 2024-08-19 05:45:25 +02:00
Makefile
match.c apparmor: ensure WB_HISTORY_SIZE value is a power of 2 2025-08-28 16:24:11 +02:00
mount.c
net.c
nulldfa.in
path.c
policy_ns.c
policy_unpack_test.c apparmor: test: Fix memory leak for aa_unpack_strdup() 2024-12-14 19:51:14 +01:00
policy_unpack.c apparmor: use kvfree_sensitive to free data->data 2024-08-19 05:45:13 +02:00
policy.c apparmor: use kvfree_sensitive to free data->data 2024-08-19 05:45:13 +02:00
procattr.c
resource.c
secid.c
stacksplitdfa.in
task.c