]> git.ipfire.org Git - thirdparty/linux.git/commit
apparmor: put secmark label after secid lookup
authorZygmunt Krynicki <me@zygoon.pl>
Tue, 5 May 2026 03:40:53 +0000 (05:40 +0200)
committerJohn Johansen <john.johansen@canonical.com>
Sun, 14 Jun 2026 03:18:30 +0000 (20:18 -0700)
commit340372688bb87da45ff8d4e2f82ccfd1b64c65ff
tree5856cb5ef15a9345fd75d530ab62c6876f07552c
parentfea23bf73f0cae8ccb1d0684e4a3003874771f41
apparmor: put secmark label after secid lookup

apparmor_secmark_init() parses a configured secmark label to obtain its
secid.  aa_label_strn_parse() returns a refcounted label, but the success
path kept that reference after copying the secid.

Fixes: ab9f2115081a ("apparmor: Allow filtering based on secmark policy")
Signed-off-by: Zygmunt Krynicki <me@zygoon.pl>
Signed-off-by: John Johansen <john.johansen@canonical.com>
security/apparmor/net.c