]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: corrections for security_secid_to_secctx returns
authorCasey Schaufler <casey@schaufler-ca.com>
Fri, 20 Dec 2024 22:02:46 +0000 (14:02 -0800)
committerPaul Moore <paul@paul-moore.com>
Sun, 5 Jan 2025 03:11:22 +0000 (22:11 -0500)
commit3b44cd0998678b55a0df20b514bca0e298f4ff48
tree64449229b850dad9768d26e1433f1df8240bee3c
parentb00083aed484a2885bc92c6a7a85d7952c101d75
net: corrections for security_secid_to_secctx returns

security_secid_to_secctx() returns the size of the new context,
whereas previous versions provided that via a pointer parameter.
Correct the type of the value returned in nfqnl_get_sk_secctx()
and the check for error in netlbl_unlhsh_add(). Add an error
check.

Fixes: 2d470c778120 ("lsm: replace context+len with lsm_context")
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
net/netfilter/nfnetlink_queue.c
net/netlabel/netlabel_unlabeled.c