Eric Dumazet
083b78a9ed
ip: fix ip_mc_may_pull() return value
ip_mc_may_pull() must return 0 if there is a problem, not an errno.
syzbot reported :
BUG: KASAN: use-after-free in br_ip4_multicast_igmp3_report net/bridge/br_multicast.c:947 [inline]
BUG: KASAN: use-after-free in br_multicast_ipv4_rcv net/bridge/br_multicast.c:1631 [inline]
BUG: KASAN: use-after-free in br_multicast_rcv+0x3cd8/0x4440 net/bridge/br_multicast.c:1741
Read of size 4 at addr ffff88820a4084ee by task syz-executor.2/11183
CPU: 1 PID: 11183 Comm: syz-executor.2 Not tainted 5.0.0+ #14
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x172/0x1f0 lib/dump_stack.c:113
print_address_description.cold+0x7c/0x20d mm/kasan/report.c:187
kasan_report.cold+0x1b/0x40 mm/kasan/report.c:317
__asan_report_load4_noabort+0x14/0x20 mm/kasan/generic_report.c:131
br_ip4_multicast_igmp3_report net/bridge/br_multicast.c:947 [inline]
br_multicast_ipv4_rcv net/bridge/br_multicast.c:1631 [inline]
br_multicast_rcv+0x3cd8/0x4440 net/bridge/br_multicast.c:1741
br_handle_frame_finish+0xa3a/0x14c0 net/bridge/br_input.c:108
br_nf_hook_thresh+0x2ec/0x380 net/bridge/br_netfilter_hooks.c:1005
br_nf_pre_routing_finish+0x8e2/0x1750 net/bridge/br_netfilter_hooks.c:410
NF_HOOK include/linux/netfilter.h:289 [inline]
NF_HOOK include/linux/netfilter.h:283 [inline]
br_nf_pre_routing+0x7e7/0x13a0 net/bridge/br_netfilter_hooks.c:506
nf_hook_entry_hookfn include/linux/netfilter.h:119 [inline]
nf_hook_slow+0xbf/0x1f0 net/netfilter/core.c:511
nf_hook include/linux/netfilter.h:244 [inline]
NF_HOOK include/linux/netfilter.h:287 [inline]
br_handle_frame+0x95b/0x1450 net/bridge/br_input.c:305
__netif_receive_skb_core+0xa96/0x3040 net/core/dev.c:4902
__netif_receive_skb_one_core+0xa8/0x1a0 net/core/dev.c:4971
__netif_receive_skb+0x2c/0x1c0 net/core/dev.c:5083
netif_receive_skb_internal+0x117/0x660 net/core/dev.c:5186
netif_receive_skb+0x6e/0x5a0 net/core/dev.c:5261
Fixes: ba5ea61462 ("bridge: simplify ip_mc_check_igmp() and ipv6_mc_check_mld() calls")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: syzbot <syzkaller@googlegroups.com>
Cc: Linus Lüssing <linus.luessing@c0d3.blue>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-03-09 19:52:47 -08:00
..
2019-02-06 09:36:36 -08:00
2019-03-05 09:09:55 -08:00
2019-01-31 12:51:33 +00:00
2019-03-04 15:32:43 +00:00
2019-03-01 12:04:17 -08:00
2019-02-28 09:16:12 +01:00
2019-02-25 09:28:54 +01:00
2019-03-01 14:28:43 +01:00
2019-03-05 08:26:13 -08:00
2019-02-08 22:39:01 -08:00
2019-03-03 23:45:27 +00:00
2019-02-01 15:46:23 -08:00
2019-01-30 23:02:10 +00:00
2019-03-06 10:46:29 -08:00
2019-01-22 14:39:38 -07:00
2019-01-24 11:11:45 -07:00
2019-02-07 12:57:17 -07:00
2019-01-31 10:13:21 +01:00
2019-02-01 20:55:38 +01:00
2019-03-08 21:17:07 +01:00
2019-02-27 17:22:50 +01:00
2019-02-01 20:55:38 +01:00
2019-02-15 19:52:17 +01:00
2019-01-21 07:23:42 +13:00
2019-01-30 19:27:00 +01:00
2019-01-25 18:41:52 +08:00
2019-01-30 11:02:11 -08:00
2019-02-16 15:02:03 +01:00
2019-02-22 12:55:31 -08:00
2019-02-24 17:33:59 -08:00
2019-02-27 17:22:50 +01:00
2019-03-04 10:32:48 -08:00
2019-01-29 12:09:11 +01:00
2019-01-31 08:25:09 -07:00
2019-02-22 12:56:24 -08:00
2019-01-24 22:45:34 -08:00
2019-03-09 19:52:47 -08:00
2019-01-22 17:18:09 -08:00
2019-01-18 00:18:45 +01:00
2019-01-22 17:18:08 -08:00
2019-03-03 21:05:10 -08:00
2019-02-19 21:53:07 +01:00
2019-02-15 14:12:09 -08:00
2019-01-21 09:57:43 -08:00
2019-02-24 17:45:25 -08:00
2019-02-05 11:51:56 -07:00
2019-02-18 16:43:54 -08:00
2019-02-16 15:02:03 +01:00
2019-02-01 15:46:23 -08:00
2019-02-13 22:00:16 -08:00
2019-02-15 19:52:56 +01:00
2019-02-16 13:45:01 -08:00
2019-03-02 12:54:35 -08:00
2019-01-28 11:32:58 +01:00
2019-02-04 18:21:12 +01:00
2019-01-19 10:09:58 -08:00
2019-02-08 15:02:49 -08:00
2019-02-11 11:46:43 +01:00
2019-02-07 18:11:58 -08:00
2019-03-03 21:47:57 -08:00
2019-02-24 12:39:45 -08:00
2019-01-30 22:49:06 +01:00
2019-02-17 15:53:01 -08:00
2019-01-23 15:52:15 +00:00
2019-02-22 13:49:00 +01:00
2019-02-25 09:10:51 -08:00
2019-03-08 18:23:29 -08:00
2019-02-03 11:17:31 -08:00
2019-01-30 22:24:49 -08:00
2019-01-18 09:33:18 +01:00
2019-02-24 12:06:19 -08:00