Eric Dumazet
c543cb4a5f
ipv4: ensure rcu_read_lock() in ipv4_link_failure()
...
fib_compute_spec_dst() needs to be called under rcu protection.
syzbot reported :
WARNING: suspicious RCU usage
5.1.0-rc4+ #165 Not tainted
include/linux/inetdevice.h:220 suspicious rcu_dereference_check() usage!
other info that might help us debug this:
rcu_scheduler_active = 2, debug_locks = 1
1 lock held by swapper/0/0:
#0 : 0000000051b67925 ((&n->timer)){+.-.}, at: lockdep_copy_map include/linux/lockdep.h:170 [inline]
#0 : 0000000051b67925 ((&n->timer)){+.-.}, at: call_timer_fn+0xda/0x720 kernel/time/timer.c:1315
stack backtrace:
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.1.0-rc4+ #165
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
<IRQ>
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x172/0x1f0 lib/dump_stack.c:113
lockdep_rcu_suspicious+0x153/0x15d kernel/locking/lockdep.c:5162
__in_dev_get_rcu include/linux/inetdevice.h:220 [inline]
fib_compute_spec_dst+0xbbd/0x1030 net/ipv4/fib_frontend.c:294
spec_dst_fill net/ipv4/ip_options.c:245 [inline]
__ip_options_compile+0x15a7/0x1a10 net/ipv4/ip_options.c:343
ipv4_link_failure+0x172/0x400 net/ipv4/route.c:1195
dst_link_failure include/net/dst.h:427 [inline]
arp_error_report+0xd1/0x1c0 net/ipv4/arp.c:297
neigh_invalidate+0x24b/0x570 net/core/neighbour.c:995
neigh_timer_handler+0xc35/0xf30 net/core/neighbour.c:1081
call_timer_fn+0x190/0x720 kernel/time/timer.c:1325
expire_timers kernel/time/timer.c:1362 [inline]
__run_timers kernel/time/timer.c:1681 [inline]
__run_timers kernel/time/timer.c:1649 [inline]
run_timer_softirq+0x652/0x1700 kernel/time/timer.c:1694
__do_softirq+0x266/0x95a kernel/softirq.c:293
invoke_softirq kernel/softirq.c:374 [inline]
irq_exit+0x180/0x1d0 kernel/softirq.c:414
exiting_irq arch/x86/include/asm/apic.h:536 [inline]
smp_apic_timer_interrupt+0x14a/0x570 arch/x86/kernel/apic/apic.c:1062
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:807
Fixes: ed0de45a1008 ("ipv4: recompile ip options in ipv4_link_failure")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: syzbot <syzkaller@googlegroups.com>
Cc: Stephen Suryaputra <ssuryaextr@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-04-14 13:43:17 -07:00
..
2019-01-22 09:51:19 +01:00
2019-03-13 11:50:04 +01:00
2019-04-04 17:18:34 -07:00
2019-03-15 11:25:48 -07:00
2019-03-07 10:14:50 -08:00
2019-01-23 11:18:00 -08:00
2019-03-25 09:31:19 +01:00
2019-04-12 10:25:03 -07:00
2019-03-08 21:17:07 +01:00
2019-02-23 13:34:40 -08:00
2019-04-11 11:13:51 -07:00
2019-02-17 11:01:17 -08:00
2019-01-22 11:33:46 +01:00
2019-03-25 22:28:07 +01:00
2019-04-12 10:25:03 -07:00
2019-04-01 18:15:10 -07:00
2019-01-29 21:18:54 -08:00
2018-10-04 09:40:52 -07:00
2019-03-28 16:57:19 -07:00
2019-02-22 12:55:31 -08:00
2019-03-07 11:02:08 -08:00
2019-02-26 08:27:05 -08:00
2019-04-14 13:43:17 -07:00
2019-04-12 10:25:03 -07:00
2018-11-10 16:55:11 -08:00
2019-04-01 14:59:20 -07:00
2019-02-12 10:36:42 +01:00
2019-03-13 14:19:35 -07:00
2018-12-03 14:15:26 -08:00
2019-04-12 10:25:03 -07:00
2019-04-09 13:40:32 +02:00
2019-03-19 16:00:22 -07:00
2019-03-16 11:44:33 -07:00
2019-03-20 08:32:58 +01:00
2019-02-27 21:45:24 -08:00
2019-04-12 10:25:03 -07:00
2019-04-11 13:59:49 -07:00
2019-04-06 15:05:07 -07:00
2019-03-28 17:15:44 -07:00
2019-03-20 10:46:50 -07:00
2019-02-21 16:23:56 -08:00
2019-03-05 21:07:14 -08:00
2019-04-12 10:25:03 -07:00
2018-12-18 13:13:56 +01:00
2019-03-18 16:53:22 -07:00
2019-04-12 16:57:23 -07:00
2019-04-04 10:55:59 -07:00
2019-04-12 10:25:03 -07:00
2019-04-11 11:04:08 -07:00
2019-04-10 13:07:02 -07:00
2019-03-26 13:04:32 -07:00
2019-03-01 21:35:19 -08:00
2019-04-10 22:58:09 -07:00
2019-04-10 17:23:26 -07:00
2019-03-08 14:48:40 -08:00
2019-03-08 15:15:44 -08:00
2019-03-29 11:23:09 +01:00
2019-03-11 15:40:14 -07:00
2019-03-16 01:27:51 +01:00
2019-02-18 10:58:54 +01:00
2019-03-05 14:08:26 -08:00
2019-02-26 08:49:05 -08:00
2019-02-28 08:24:23 -07:00
2019-03-15 15:29:47 -07:00