diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-09 20:00:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-09 20:00:51 -0400 |
commit | 601e6bcc4ef02bda2831d5ac8133947b5edf597b (patch) | |
tree | f08e159e7b48e2e906c97faddd37b6f08d8c775a /security | |
parent | 9b6c9e96f941c5ab13dad7278a3622f58e5672fc (diff) | |
parent | 6c9f05441477e29783e8391d06c067e4a3b23d47 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller:
"Several bug fixes, many are quick merge-window regression cures:
- When NLM_F_EXCL is not set, allow same fib rule insertion. From
Hangbin Liu.
- Several cures in sja1105 DSA driver (while loop exit condition fix,
return of negative u8, etc.) from Vladimir Oltean.
- Handle tx/rx delays in realtek PHY driver properly, from Serge
Semin.
- Double free in cls_matchall, from Pieter Jansen van Vuuren.
- Disable SIOCSHWTSTAMP in macvlan/vlan containers, from Hangbin Liu.
- Endainness fixes in aqc111, from Oliver Neukum.
- Handle errors in packet_init properly, from Haibing Yue.
- Various W=1 warning fixes in kTLS, from Jakub Kicinski"
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (34 commits)
nfp: add missing kdoc
net/tls: handle errors from padding_length()
net/tls: remove set but not used variables
docs/btf: fix the missing section marks
nfp: bpf: fix static check error through tightening shift amount adjustment
selftests: bpf: initialize bpf_object pointers where needed
packet: Fix error path in packet_init
net/tcp: use deferred jump label for TCP acked data hook
net: aquantia: fix undefined devm_hwmon_device_register_with_info reference
aqc111: fix double endianness swap on BE
aqc111: fix writing to the phy on BE
aqc111: fix endianness issue in aqc111_change_mtu
vlan: disable SIOCSHWTSTAMP in container
macvlan: disable SIOCSHWTSTAMP in container
tipc: fix hanging clients using poll with EPOLLOUT flag
tuntap: synchronize through tfiles array instead of tun->numqueues
tuntap: fix dividing by zero in ebpf queue selection
dwmac4_prog_mtl_tx_algorithms() missing write operation
ptp_qoriq: fix NULL access if ptp dt node missing
net/sched: avoid double free on matchall reoffload
...
Diffstat (limited to 'security')
-rw-r--r-- | security/selinux/hooks.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index c61787b15f27..d82b87c16b0a 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -4649,7 +4649,7 @@ static int selinux_socket_connect_helper(struct socket *sock, | |||
4649 | struct lsm_network_audit net = {0,}; | 4649 | struct lsm_network_audit net = {0,}; |
4650 | struct sockaddr_in *addr4 = NULL; | 4650 | struct sockaddr_in *addr4 = NULL; |
4651 | struct sockaddr_in6 *addr6 = NULL; | 4651 | struct sockaddr_in6 *addr6 = NULL; |
4652 | unsigned short snum; | 4652 | unsigned short snum = 0; |
4653 | u32 sid, perm; | 4653 | u32 sid, perm; |
4654 | 4654 | ||
4655 | /* sctp_connectx(3) calls via selinux_sctp_bind_connect() | 4655 | /* sctp_connectx(3) calls via selinux_sctp_bind_connect() |
@@ -4674,12 +4674,12 @@ static int selinux_socket_connect_helper(struct socket *sock, | |||
4674 | break; | 4674 | break; |
4675 | default: | 4675 | default: |
4676 | /* Note that SCTP services expect -EINVAL, whereas | 4676 | /* Note that SCTP services expect -EINVAL, whereas |
4677 | * others expect -EAFNOSUPPORT. | 4677 | * others must handle this at the protocol level: |
4678 | * connect(AF_UNSPEC) on a connected socket is | ||
4679 | * a documented way disconnect the socket. | ||
4678 | */ | 4680 | */ |
4679 | if (sksec->sclass == SECCLASS_SCTP_SOCKET) | 4681 | if (sksec->sclass == SECCLASS_SCTP_SOCKET) |
4680 | return -EINVAL; | 4682 | return -EINVAL; |
4681 | else | ||
4682 | return -EAFNOSUPPORT; | ||
4683 | } | 4683 | } |
4684 | 4684 | ||
4685 | err = sel_netport_sid(sk->sk_protocol, snum, &sid); | 4685 | err = sel_netport_sid(sk->sk_protocol, snum, &sid); |