android_kernel_oneplus_msm8998/net
Tyler Hicks 5a95ecebc7 ipv4: Return EINVAL when ping_group_range sysctl doesn't map to user ns
[ Upstream commit 70ba5b6db96ff7324b8cfc87e0d0383cf59c9677 ]

The low and high values of the net.ipv4.ping_group_range sysctl were
being silently forced to the default disabled state when a write to the
sysctl contained GIDs that didn't map to the associated user namespace.
Confusingly, the sysctl's write operation would return success and then
a subsequent read of the sysctl would indicate that the low and high
values are the overflowgid.

This patch changes the behavior by clearly returning an error when the
sysctl write operation receives a GID range that doesn't map to the
associated user namespace. In such a situation, the previous value of
the sysctl is preserved and that range will be returned in a subsequent
read of the sysctl.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-25 10:18:16 +02:00
..
6lowpan 6lowpan: put mcast compression in an own function 2015-10-21 00:49:25 +02:00
9p net/9p: Switch to wait_event_killable() 2017-11-30 08:37:25 +00:00
802
8021q vlan: also check phy_driver ts_info for vlan's real device 2018-04-13 19:50:25 +02:00
appletalk
atm net: atm: Fix potential Spectre v1 2018-05-16 10:06:51 +02:00
ax25 ax25: Fix segfault after sock connection timeout 2017-02-04 09:45:09 +01:00
batman-adv batman-adv: fix packet loss for broadcasted DHCP packets to a server 2018-05-30 07:49:06 +02:00
bluetooth Bluetooth: Fix connection if directed advertising and privacy is used 2018-07-03 11:21:35 +02:00
bridge netfilter: ebtables: reject non-bridge targets 2018-07-22 14:25:54 +02:00
caif net: caif: Fix a sleep-in-atomic bug in cfpkt_create_pfx 2017-07-05 14:37:14 +02:00
can can: af_can: canfd_rcv(): replace WARN_ONCE by pr_warn_once 2018-01-31 12:06:08 +01:00
ceph libceph: validate con->state at the top of try_write() 2018-05-02 07:53:42 -07:00
core rtnetlink: validate attributes in do_setlink() 2018-06-13 16:15:29 +02:00
dcb net/dcb: make dcbnl.c explicitly non-modular 2015-10-09 07:52:27 -07:00
dccp net: dccp: switch rx_tstamp_last_feedback to monotonic clock 2018-07-22 14:25:52 +02:00
decnet dn_getsockoptdecnet: move nf_{get/set}sockopt outside sock lock 2018-02-25 11:03:38 +01:00
dns_resolver KEYS: DNS: fix parsing multiple options 2018-07-22 14:25:54 +02:00
dsa net: dsa: select NET_SWITCHDEV 2017-11-15 17:13:11 +01:00
ethernet net: introduce device min_header_len 2017-02-18 16:39:27 +01:00
hsr net/hsr: fix a warning message 2015-11-23 14:56:15 -05:00
ieee802154 net: ieee802154: fix net_device reference release too early 2018-04-13 19:50:10 +02:00
ipv4 ipv4: Return EINVAL when ping_group_range sysctl doesn't map to user ns 2018-07-25 10:18:16 +02:00
ipv6 Revert "sit: reload iphdr in ipip6_rcv" 2018-07-22 14:25:52 +02:00
ipx ipx: call ipxitf_put() in ioctl error path 2017-05-25 14:30:13 +02:00
irda irda: do not leak initialized list.dev to userspace 2017-08-30 10:19:21 +02:00
iucv net/iucv: Free memory obtained by kzalloc 2018-03-31 18:12:33 +02:00
key af_key: Always verify length of provided sadb_key 2018-06-16 09:54:25 +02:00
l2tp l2tp: revert "l2tp: fix missing print session offset info" 2018-05-26 08:48:50 +02:00
l3mdev net: Add netif_is_l3_slave 2015-10-07 04:27:43 -07:00
lapb
llc llc: properly handle dev_queue_xmit() return value 2018-05-30 07:49:06 +02:00
mac80211 mac80211: Add RX flag to indicate ICV stripped 2018-05-16 10:06:46 +02:00
mac802154 mac802154: llsec: use kzfree 2015-10-21 00:49:24 +02:00
mpls mpls, nospec: Sanitize array index in mpls_label_ok() 2018-03-11 16:19:47 +01:00
netfilter netfilter: nf_queue: augment nfqa_cfg_policy 2018-07-17 11:31:46 +02:00
netlabel netlabel: If PF_INET6, check sk_buff ip header version 2018-05-30 07:49:17 +02:00
netlink netlink: fix uninit-value in netlink_sendmsg 2018-05-16 10:06:50 +02:00
netrom
nfc net/nfc: Avoid stalls when nfc_alloc_send_skb() returned NULL. 2018-07-22 14:25:54 +02:00
openvswitch openvswitch: Don't swap table in nlattr_set() after OVS_ATTR_NESTED is found 2018-05-26 08:48:47 +02:00
packet packet: fix reserve calculation 2018-06-13 16:15:28 +02:00
phonet phonet: properly unshare skbs in phonet_rcv() 2016-01-31 11:29:00 -08:00
rds rds: avoid unenecessary cong_update in loop transport 2018-07-22 14:25:54 +02:00
rfkill rfkill: gpio: fix memory leak in probe error path 2018-05-16 10:06:51 +02:00
rose
rxrpc rxrpc: check return value of skb_to_sgvec always 2018-04-13 19:50:23 +02:00
sched net_sched: blackhole: tell upper qdisc about dropped packets 2018-07-22 14:25:53 +02:00
sctp sctp: delay the authentication for the duplicated cookie-echo chunk 2018-05-26 08:48:49 +02:00
sunrpc rpc_pipefs: fix double-dput() 2018-04-24 09:32:11 +02:00
switchdev switchdev: pass pointer to fib_info instead of copy 2016-06-24 10:18:16 -07:00
tipc tipc: add policy for TIPC_NLA_NET_ADDR 2018-04-29 07:50:06 +02:00
unix net/unix: don't show information about sockets from other namespaces 2017-11-18 11:11:06 +01:00
vmw_vsock vsock: use new wait API for vsock_stream_sendmsg() 2017-11-30 08:37:19 +00:00
wimax
wireless cfg80211: limit wiphy names to 128 bytes 2018-05-26 08:49:00 +02:00
x25 net: x25: fix one potential use-after-free issue 2018-04-13 19:50:07 +02:00
xfrm xfrm: skip policies marked as dead while rehashing 2018-07-03 11:21:32 +02:00
compat.c net: support compat 64-bit time in {s,g}etsockopt 2018-05-26 08:48:47 +02:00
Kconfig Make DST_CACHE a silent config option 2018-02-25 11:03:37 +01:00
Makefile net: Introduce L3 Master device abstraction 2015-09-29 20:40:32 -07:00
socket.c bpf: introduce BPF_JIT_ALWAYS_ON config 2018-02-03 17:04:24 +01:00
sysctl_net.c net: Use ns_capable_noaudit() when determining net sysctl permissions 2016-09-15 08:27:50 +02:00