Taras Chornyi
22e56cb2f9
net: ipv4: devinet: Fix crash when add/del multicast IP with autojoin
...
[ Upstream commit 690cc86321eb9bcee371710252742fb16fe96824 ]
When CONFIG_IP_MULTICAST is not set and multicast ip is added to the device
with autojoin flag or when multicast ip is deleted kernel will crash.
steps to reproduce:
ip addr add 224.0.0.0/32 dev eth0
ip addr del 224.0.0.0/32 dev eth0
or
ip addr add 224.0.0.0/32 dev eth0 autojoin
Unable to handle kernel NULL pointer dereference at virtual address 0000000000000088
pc : _raw_write_lock_irqsave+0x1e0/0x2ac
lr : lock_sock_nested+0x1c/0x60
Call trace:
_raw_write_lock_irqsave+0x1e0/0x2ac
lock_sock_nested+0x1c/0x60
ip_mc_config.isra.28+0x50/0xe0
inet_rtm_deladdr+0x1a8/0x1f0
rtnetlink_rcv_msg+0x120/0x350
netlink_rcv_skb+0x58/0x120
rtnetlink_rcv+0x14/0x20
netlink_unicast+0x1b8/0x270
netlink_sendmsg+0x1a0/0x3b0
____sys_sendmsg+0x248/0x290
___sys_sendmsg+0x80/0xc0
__sys_sendmsg+0x68/0xc0
__arm64_sys_sendmsg+0x20/0x30
el0_svc_common.constprop.2+0x88/0x150
do_el0_svc+0x20/0x80
el0_sync_handler+0x118/0x190
el0_sync+0x140/0x180
Fixes: 93a714d6b5 ("multicast: Extend ip address command to enable multicast group join/leave on")
Signed-off-by: Taras Chornyi <[email protected] >
Signed-off-by: Vadym Kochan <[email protected] >
Signed-off-by: David S. Miller <[email protected] >
Signed-off-by: Greg Kroah-Hartman <[email protected] >
2020-04-21 09:04:45 +02:00
..
bpfilter
SPDX update for 5.2-rc2, round 1
2019-05-21 12:33:38 -07:00
netfilter
netfilter: arp_tables: init netns pointer in xt_tgdtor_param struct
2020-01-23 08:22:47 +01:00
af_inet.c
net: remove empty inet_exit_net
2019-08-19 18:22:54 -07:00
ah4.c
xfrm: remove type and offload_type map from xfrm_state_afinfo
2019-06-06 08:34:50 +02:00
arp.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152
2019-05-30 11:26:32 -07:00
cipso_ipv4.c
ipv4: ensure rcu_read_lock() in cipso_v4_error()
2020-03-21 08:11:59 +01:00
datagram.c
inet: stop leaking jiffies on the wire
2019-11-01 14:57:52 -07:00
devinet.c
net: ipv4: devinet: Fix crash when add/del multicast IP with autojoin
2020-04-21 09:04:45 +02:00
esp4.c
xfrm: remove get_mtu indirection from xfrm_type
2019-07-01 06:16:40 +02:00
esp4_offload.c
xfrm: support output_mark for offload ESP packets
2020-01-29 16:45:31 +01:00
fib_frontend.c
ipv4: fix a RCU-list lock in inet_dump_fib()
2020-04-01 11:01:31 +02:00
fib_lookup.h
ipv4: Use accessors for fib_info nexthop data
2019-06-04 19:26:49 -07:00
fib_notifier.c
fib_rules.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2019-06-07 11:00:14 -07:00
fib_semantics.c
ipv4: Fix table id reference in fib_sync_down_addr
2019-11-07 16:14:36 -08:00
fib_trie.c
ipv4: Detect rollover in specific fib table dump
2020-01-29 16:45:24 +01:00
fou.c
fou: Fix IPv6 netlink policy
2020-01-29 16:45:22 +01:00
gre_demux.c
gre: fix uninit-value in __iptunnel_pull_header
2020-03-18 07:17:38 +01:00
gre_offload.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152
2019-05-30 11:26:32 -07:00
icmp.c
net: icmp: fix data-race in cmp_global_allow()
2020-01-04 19:18:40 +01:00
igmp.c
net: fix __ip_mc_inc_group usage
2019-08-20 12:48:06 -07:00
inet_connection_sock.c
net: memcg: fix lockdep splat in inet_csk_accept()
2020-03-18 07:17:43 +01:00
inet_diag.c
inet_diag: return classid for all socket types
2020-03-18 07:17:38 +01:00
inet_fragment.c
inet: frags: re-introduce skb coalescing for local delivery
2019-08-08 15:55:10 -07:00
inet_hashtables.c
tcp/dccp: fix possible race __inet_lookup_established()
2020-01-04 19:19:13 +01:00
inet_timewait_sock.c
inetpeer.c
inetpeer: fix data-race in inet_putpeer / inet_putpeer
2020-01-04 19:18:39 +01:00
ip_forward.c
ipv4: Revert removal of rt_uses_gateway
2019-09-20 18:23:33 -07:00
ip_fragment.c
inet: frags: re-introduce skb coalescing for local delivery
2019-08-08 15:55:10 -07:00
ip_gre.c
net: ip_gre: Accept IFLA_INFO_DATA-less configuration
2020-04-01 11:01:46 +02:00
ip_input.c
netfilter: drop bridge nf reset from nf_reset
2019-10-01 18:42:15 +02:00
ip_options.c
netfilter: nf_tables: add support for matching IPv4 options
2019-06-21 18:35:51 +02:00
ip_output.c
inet: protect against too small mtu values.
2019-12-18 16:08:17 +01:00
ip_sockglue.c
ip_sockglue: Fix missing-check bug in ip_ra_control()
2019-05-25 11:00:50 -07:00
ip_tunnel.c
net, ip_tunnel: fix namespaces move
2020-01-29 16:45:20 +01:00
ip_tunnel_core.c
ip_tunnel: allow not to count pkts on tstats by setting skb's dev to NULL
2019-06-18 20:48:45 -04:00
ip_vti.c
vti[6]: fix packet tx through bpf_redirect() in XinY cases
2020-04-01 11:02:05 +02:00
ipcomp.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec-next
2019-07-05 15:01:15 -07:00
ipconfig.c
ipip.c
ipip: validate header length in ipip_tunnel_xmit
2019-07-25 17:23:40 -07:00
ipmr.c
ipmr: Fix skb headroom in ipmr_get_route().
2019-11-16 13:06:54 -08:00
ipmr_base.c
Kconfig
vti[6]: fix packet tx through bpf_redirect() in XinY cases
2020-04-01 11:02:05 +02:00
Makefile
net: Initial nexthop code
2019-05-28 21:37:30 -07:00
metrics.c
netfilter.c
netlink.c
nexthop.c
net: include struct nhmsg size in nh nlmsg size
2020-02-01 09:34:39 +00:00
ping.c
ip: support SO_MARK cmsg
2019-09-13 21:44:19 +02:00
proc.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2019-06-17 20:20:36 -07:00
protocol.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152
2019-05-30 11:26:32 -07:00
raw.c
netfilter: drop bridge nf reset from nf_reset
2019-10-01 18:42:15 +02:00
raw_diag.c
inet_diag: return classid for all socket types
2020-03-18 07:17:38 +01:00
route.c
net: add bool confirm_neigh parameter for dst_ops.update_pmtu
2020-01-04 19:18:58 +01:00
syncookies.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152
2019-05-30 11:26:32 -07:00
sysctl_net_ipv4.c
net/ipv4: fix sysctl max for fib_multipath_hash_policy
2019-11-18 17:25:36 -08:00
tcp.c
tcp: repair: fix TCP_QUEUE_SEQ implementation
2020-04-01 11:01:39 +02:00
tcp_bbr.c
tcp_bbr: improve arithmetic division in bbr_update_bw()
2020-01-29 16:45:21 +01:00
tcp_bic.c
tcp_bpf.c
bpf/sockmap: Read psock ingress_msg before sk_receive_queue
2020-01-23 08:22:47 +01:00
tcp_cdg.c
tcp_cong.c
tcp: fix tcp_set_congestion_control() use from bpf hook
2019-07-18 20:33:48 -07:00
tcp_cubic.c
tcp_dctcp.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152
2019-05-30 11:26:32 -07:00
tcp_dctcp.h
tcp_diag.c
tcp: annotate tp->write_seq lockless reads
2019-10-13 10:13:08 -07:00
tcp_fastopen.c
tcp: add rcu protection around tp->fastopen_rsk
2019-10-13 10:13:08 -07:00
tcp_highspeed.c
tcp_htcp.c
tcp_hybla.c
tcp_illinois.c
tcp_input.c
tcp: fix TFO SYNACK undo to avoid double-timestamp-undo
2020-04-08 09:08:45 +02:00
tcp_ipv4.c
tcp/dccp: fix possible race __inet_lookup_established()
2020-01-04 19:19:13 +01:00
tcp_lp.c
tcp_metrics.c
tcp_minisocks.c
tcp: annotate tp->snd_nxt lockless reads
2019-10-13 10:13:08 -07:00
tcp_nv.c
tcp_offload.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152
2019-05-30 11:26:32 -07:00
tcp_output.c
tcp: ensure skb->dev is NULL before leaving TCP stack
2020-04-01 11:01:39 +02:00
tcp_rate.c
tcp_recovery.c
tcp_scalable.c
tcp_timer.c
tcp: add rcu protection around tp->fastopen_rsk
2019-10-13 10:13:08 -07:00
tcp_ulp.c
bpf: Sockmap/tls, push write_space updates through ulp updates
2020-01-23 08:22:45 +01:00
tcp_vegas.c
tcp_vegas.h
tcp_veno.c
tcp_westwood.c
tcp_yeah.c
tunnel4.c
udp.c
udp: rehash on disconnect
2020-03-05 16:43:33 +01:00
udp_diag.c
inet_diag: return classid for all socket types
2020-03-18 07:17:38 +01:00
udp_impl.h
udp_offload.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2019-06-22 08:59:24 -04:00
udp_tunnel.c
udplite.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152
2019-05-30 11:26:32 -07:00
xfrm4_input.c
xfrm4_output.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152
2019-05-30 11:26:32 -07:00
xfrm4_policy.c
net: add bool confirm_neigh parameter for dst_ops.update_pmtu
2020-01-04 19:18:58 +01:00
xfrm4_protocol.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152
2019-05-30 11:26:32 -07:00
xfrm4_state.c
xfrm: remove eth_proto value from xfrm_state_afinfo
2019-06-06 08:34:50 +02:00
xfrm4_tunnel.c
xfrm: remove type and offload_type map from xfrm_state_afinfo
2019-06-06 08:34:50 +02:00