linux/security/apparmor
John Johansen 4c011ed8a2 apparmor: fix label can not be immediately before a declaration
[ Upstream commit 1ed40bd525 ]

Fix error reported by kernel test robot

security/apparmor/policy.c:1381:2: error: a label can only be part of
a statement and a declaration is not a statement

All errors (new ones prefixed by >>):

   security/apparmor/policy.c: In function 'aa_replace_profiles':
>> security/apparmor/policy.c:1381:2: error: a label can only be part
   of a statement and a declaration is not a statement
     ssize_t udata_sz = udata->size;
     ^~~~~

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202606150525.npax8WiH-lkp@intel.com/
Fixes: 7b42f95813 ("apparmor: fix potential UAF in aa_replace_profiles")
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-07-24 15:51:39 +02:00
..
include apparmor: fix use-after-free in rawdata dedup loop 2026-07-24 15:51:16 +02:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
apparmorfs.c apparmor: fix race between freeing data and fs accessing it 2026-04-18 10:33:36 +02:00
audit.c ima: Avoid blocking in RCU read-side critical section 2024-07-18 13:07:34 +02:00
capability.c apparmor: fix 'Do simple duplicate message elimination' 2024-12-14 19:51:11 +01:00
crypto.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
domain.c apparmor: grab ns lock and refresh when looking up changehat child profiles 2026-07-24 15:51:38 +02:00
file.c apparmor: handle idmapped mounts 2021-01-24 14:27:20 +01:00
ipc.c audit: purge audit_log_string from the intra-kernel audit API 2020-07-21 11:12:31 -04:00
Kconfig Minor fixes for v5.9. 2020-08-11 14:30:36 -07:00
label.c apparmor: aa_label_alloc use aa_label_free on alloc failure 2026-07-24 15:51:38 +02:00
lib.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
lsm.c apparmor: mediate the implicit connect of TCP fast open sendmsg 2026-07-24 15:51:16 +02:00
Makefile apparmor: add base infastructure for socket mediation 2018-03-13 17:25:48 -07:00
match.c apparmor: fix differential encoding verification 2026-04-18 10:33:36 +02:00
mount.c apparmor: fix reference count leak in aa_pivotroot() 2022-08-25 11:40:01 +02:00
net.c apparmor: put secmark label after secid lookup 2026-07-24 15:51:39 +02:00
nulldfa.in apparmor: cleanup add proper line wrapping to nulldfa.in 2018-02-09 11:30:01 -08:00
path.c AppArmor: Remove semicolon 2020-01-18 15:36:58 -08:00
policy.c apparmor: fix label can not be immediately before a declaration 2026-07-24 15:51:39 +02:00
policy_ns.c apparmor: fix: limit the number of levels of policy namespaces 2026-04-18 10:33:36 +02:00
policy_unpack.c apparmor: validate default DFA states are in bounds 2026-06-19 13:33:50 +02:00
policy_unpack_test.c apparmor: test: Fix memory leak for aa_unpack_strdup() 2024-12-14 19:51:14 +01:00
procattr.c apparmor: aa_getprocattr free procattr leak on format failure 2026-07-24 15:51:38 +02:00
resource.c apparmor: fix rlimit for posix cpu timers 2026-03-04 07:19:53 -05:00
secid.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00
stacksplitdfa.in apparmor: use the dfa to do label parse string splitting 2018-02-09 11:30:01 -08:00
task.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441 2019-06-05 17:37:17 +02:00