syzbot


KASAN: slab-out-of-bounds Read in fib6_rule_lookup (2)

Status: auto-closed as invalid on 2019/10/25 08:36
Reported-by: syzbot+49f38f33f3c5d76cb19b@syzkaller.appspotmail.com
First crash: 1416d, last: 1349d
similar bugs (1):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-out-of-bounds Read in fib6_rule_lookup 1 1490d 1490d 0/24 closed as invalid on 2019/03/20 17:31

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in fib6_rule_lookup+0x4e2/0x560 net/ipv6/fib6_rules.c:119
Read of size 2 at addr ffff88809fee0ba6 by task ksoftirqd/1/16

CPU: 1 PID: 16 Comm: ksoftirqd/1 Not tainted 5.1.0-rc2+ #145
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_load2_noabort+0x14/0x20 mm/kasan/generic_report.c:130
 fib6_rule_lookup+0x4e2/0x560 net/ipv6/fib6_rules.c:119
 ip6_route_input_lookup+0xb7/0xd0 net/ipv6/route.c:1937
 ip6_route_input+0x5e2/0x9e0 net/ipv6/route.c:2072
 ip6_rcv_finish_core.isra.0+0x174/0x590 net/ipv6/ip6_input.c:63
 ip6_rcv_finish+0x17d/0x320 net/ipv6/ip6_input.c:74
 NF_HOOK include/linux/netfilter.h:289 [inline]
 NF_HOOK include/linux/netfilter.h:283 [inline]
 ipv6_rcv+0x10e/0x420 net/ipv6/ip6_input.c:272
 __netif_receive_skb_one_core+0x115/0x1a0 net/core/dev.c:4973
 __netif_receive_skb+0x2c/0x1c0 net/core/dev.c:5085
 process_backlog+0x206/0x750 net/core/dev.c:5925
 napi_poll net/core/dev.c:6348 [inline]
 net_rx_action+0x4fa/0x1070 net/core/dev.c:6414
 __do_softirq+0x266/0x95a kernel/softirq.c:293
 run_ksoftirqd kernel/softirq.c:655 [inline]
 run_ksoftirqd+0x8e/0x110 kernel/softirq.c:647
 smpboot_thread_fn+0x6ab/0xa10 kernel/smpboot.c:164
 kthread+0x357/0x430 kernel/kthread.c:253
 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352

Allocated by task 16:
 save_stack+0x45/0xd0 mm/kasan/common.c:75
 set_track mm/kasan/common.c:87 [inline]
 __kasan_kmalloc mm/kasan/common.c:497 [inline]
 __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:470
 kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:505
 slab_post_alloc_hook mm/slab.h:436 [inline]
 slab_alloc mm/slab.c:3392 [inline]
 kmem_cache_alloc+0x11a/0x6f0 mm/slab.c:3554
 dst_alloc+0x10e/0x200 net/core/dst.c:109
 ip6_dst_alloc+0x34/0xa0 net/ipv6/route.c:355
 ip6_rt_pcpu_alloc net/ipv6/route.c:1225 [inline]
 rt6_make_pcpu_route net/ipv6/route.c:1255 [inline]
 ip6_pol_route+0x743/0x1040 net/ipv6/route.c:1909
 ip6_pol_route_input+0x65/0x80 net/ipv6/route.c:1925
 fib6_rule_lookup+0x128/0x560 net/ipv6/fib6_rules.c:118
 ip6_route_input_lookup+0xb7/0xd0 net/ipv6/route.c:1937
 ip6_route_input+0x5e2/0x9e0 net/ipv6/route.c:2072
 ip6_rcv_finish_core.isra.0+0x174/0x590 net/ipv6/ip6_input.c:63
 ip6_rcv_finish+0x17d/0x320 net/ipv6/ip6_input.c:74
 NF_HOOK include/linux/netfilter.h:289 [inline]
 NF_HOOK include/linux/netfilter.h:283 [inline]
 ipv6_rcv+0x10e/0x420 net/ipv6/ip6_input.c:272
 __netif_receive_skb_one_core+0x115/0x1a0 net/core/dev.c:4973
 __netif_receive_skb+0x2c/0x1c0 net/core/dev.c:5085
 process_backlog+0x206/0x750 net/core/dev.c:5925
 napi_poll net/core/dev.c:6348 [inline]
 net_rx_action+0x4fa/0x1070 net/core/dev.c:6414
 __do_softirq+0x266/0x95a kernel/softirq.c:293

Freed by task 0:
(stack is not available)

The buggy address belongs to the object at ffff88809fee0ac0
 which belongs to the cache ip6_dst_cache of size 224
The buggy address is located 6 bytes to the right of
 224-byte region [ffff88809fee0ac0, ffff88809fee0ba0)
The buggy address belongs to the page:
page:ffffea00027fb800 count:1 mapcount:0 mapping:ffff88809c1b0000 index:0x0
flags: 0x1fffc0000000200(slab)
raw: 01fffc0000000200 ffffea0002522b48 ffffea00021fd108 ffff88809c1b0000
raw: 0000000000000000 ffff88809fee00c0 000000010000000c 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff88809fee0a80: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00
 ffff88809fee0b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff88809fee0b80: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc
                               ^
 ffff88809fee0c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff88809fee0c80: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc
==================================================================

Crashes (4):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets Title
ci-upstream-net-this-kasan-gce 2019/03/30 03:01 net 4d31c4fa3f9e c35ee0ea .config console log report
ci-upstream-net-this-kasan-gce 2019/03/26 20:31 net d29f5aa0bc0c 55684ce1 .config console log report
ci-upstream-net-kasan-gce 2019/06/01 04:31 net-next c9bb6165a16e 53c81ea5 .config console log report
ci-upstream-net-kasan-gce 2019/03/25 16:53 net-next 68cc2999f692 2c86e0a5 .config console log report
* Struck through repros no longer work on HEAD.