projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e783362
)
Fix incorrect type in assignment of ipv6 port for audit
author
Casey Schaufler
<casey@schaufler-ca.com>
Mon, 28 Feb 2022 23:45:32 +0000
(15:45 -0800)
committer
Casey Schaufler
<casey@schaufler-ca.com>
Mon, 28 Feb 2022 23:45:32 +0000
(15:45 -0800)
Remove inappropriate use of ntohs() and assign the
port value directly.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
security/smack/smack_lsm.c
patch
|
blob
|
history
diff --git
a/security/smack/smack_lsm.c
b/security/smack/smack_lsm.c
index 14b279cc75c964b7fb5f5001d41bd20fb23940a7..6207762dbdb131260730e73dd6456932af84de09 100644
(file)
--- a/
security/smack/smack_lsm.c
+++ b/
security/smack/smack_lsm.c
@@
-2510,7
+2510,7
@@
static int smk_ipv6_check(struct smack_known *subject,
#ifdef CONFIG_AUDIT
smk_ad_init_net(&ad, __func__, LSM_AUDIT_DATA_NET, &net);
ad.a.u.net->family = PF_INET6;
- ad.a.u.net->dport =
ntohs(address->sin6_port)
;
+ ad.a.u.net->dport =
address->sin6_port
;
if (act == SMK_RECEIVING)
ad.a.u.net->v6info.saddr = address->sin6_addr;
else