android_kernel_motorola_sm6375/net
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Jonathon Reinhart baea536cf5 netfilter: conntrack: Make global sysctls readonly in non-init netns
commit 2671fa4dc0109d3fb581bc3078fdf17b5d9080f6 upstream.

These sysctls point to global variables:
- NF_SYSCTL_CT_MAX (&nf_conntrack_max)
- NF_SYSCTL_CT_EXPECT_MAX (&nf_ct_expect_max)
- NF_SYSCTL_CT_BUCKETS (&nf_conntrack_htable_size_user)

Because their data pointers are not updated to point to per-netns
structures, they must be marked read-only in a non-init_net ns.
Otherwise, changes in any net namespace are reflected in (leaked into)
all other net namespaces. This problem has existed since the
introduction of net namespaces.

The current logic marks them read-only only if the net namespace is
owned by an unprivileged user (other than init_user_ns).

Commit d0febd81ae77 ("netfilter: conntrack: re-visit sysctls in
unprivileged namespaces") "exposes all sysctls even if the namespace is
unpriviliged." Since we need to mark them readonly in any case, we can
forego the unprivileged user check altogether.

Fixes: d0febd81ae77 ("netfilter: conntrack: re-visit sysctls in unprivileged namespaces")
Signed-off-by: Jonathon Reinhart <Jonathon.Reinhart@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-19 10:08:33 +02:00
..
6lowpan
9p
802
8021q
appletalk appletalk: Fix skb allocation size in loopback case 2021-04-07 14:47:41 +02:00
atm
ax25
batman-adv batman-adv: initialize "struct batadv_tvlv_tt_vlan_data"->reserved field 2021-04-14 08:24:11 +02:00
bluetooth Bluetooth: check for zapped sk before connecting 2021-05-19 10:08:21 +02:00
bpf
bpfilter
bridge net: bridge: when suppression is enabled exclude RARP packets 2021-05-19 10:08:21 +02:00
caif
can can: bcm/raw: fix msg_namelen values depending on CAN_REQUIRED_SIZE 2021-04-14 08:24:14 +02:00
ceph
core mm: fix struct page layout on 32-bit systems 2021-05-19 10:08:31 +02:00
dcb
dccp ipv6: weaken the v4mapped source check 2021-04-07 14:47:38 +02:00
decnet
dns_resolver
dsa net: dsa: tag_mtk: fix 802.1ad VLAN egress 2021-03-20 10:39:47 +01:00
ethernet
hsr hsr: use netdev_err() instead of WARN_ONCE() 2021-05-14 09:44:10 +02:00
ieee802154 net: ieee802154: forbid monitor for add llsec seclevel 2021-04-21 12:56:15 +02:00
ife
ipv4 net: Only allow init netns to set default tcp cong to a restricted algo 2021-05-14 09:44:33 +02:00
ipv6 ip6_vti: proper dev_{hold|put} in ndo_[un]init methods 2021-05-19 10:08:21 +02:00
iucv net/af_iucv: remove WARN_ONCE on malformed RX packets 2021-03-07 12:20:42 +01:00
kcm
key
l2tp
l3mdev
lapb
llc
mac80211 mac80211: clear the beacon's CRC after channel switch 2021-05-19 10:08:22 +02:00
mac802154 net: mac802154: Fix general protection fault 2021-04-14 08:24:18 +02:00
mpls net: avoid infinite loop in mpls_gso_segment when mpls_hlen == 0 2021-03-17 17:03:31 +01:00
ncsi net/ncsi: Avoid channel_monitor hrtimer deadlock 2021-04-14 08:24:15 +02:00
netfilter netfilter: conntrack: Make global sysctls readonly in non-init netns 2021-05-19 10:08:33 +02:00
netlabel cipso,calipso: resolve a number of problems with the DOI refcounts 2021-03-17 17:03:35 +01:00
netlink
netrom
nfc net:nfc:digital: Fix a double free in digital_tg_recv_dep_req 2021-05-14 09:44:32 +02:00
nsh
openvswitch openvswitch: fix stack OOB read while fragmenting IPv4 packets 2021-05-11 14:04:14 +02:00
packet
phonet
psample
qrtr net: qrtr: fix a kernel-infoleak in qrtr_recvmsg() 2021-03-30 14:35:29 +02:00
rds net/rds: Fix a use after free in rds_message_map_pages 2021-04-14 08:24:15 +02:00
rfkill
rose
rxrpc rxrpc: Fix clearance of Tx/Rx ring when releasing a call 2021-02-17 10:35:18 +01:00
sched net: sched: tapr: prevent cycle_time == 0 in parse_taprio_schedule 2021-05-19 10:08:23 +02:00
sctp sctp: fix a SCTP_MIB_CURRESTAB leak in sctp_sf_do_dupcook_b 2021-05-19 10:08:27 +02:00
smc smc: disallow TCP_ULP in smc_setsockopt() 2021-05-19 10:08:28 +02:00
strparser
sunrpc sunrpc: Fix misplaced barrier in call_decode 2021-05-19 10:08:27 +02:00
switchdev
tipc tipc: convert dest node's address to network order 2021-05-19 10:08:20 +02:00
tls
unix
vmw_vsock vsock/vmci: log once the failed queue pair allocation 2021-05-14 09:44:30 +02:00
wimax
wireless cfg80211: scan: drop entry from hidden_list on overflow 2021-05-14 09:44:13 +02:00
x25
xdp
xfrm net: xfrm: Localize sequence counter per network namespace 2021-04-14 08:24:13 +02:00
compat.c
Kconfig
Makefile
socket.c
sysctl_net.c