Hello,
syzbot found the following crash on:
HEAD commit: e9a6a1ab BACKPORT: zram: drop max_zpage_size and use zs_hu..
git tree: android-4.14
console output:
https://syzkaller.appspot.com/x/log.txt?x=16e7210a400000
kernel config:
https://syzkaller.appspot.com/x/.config?x=10d236078f3378a3
dashboard link:
https://syzkaller.appspot.com/bug?extid=bb378a1032f94b28f89b
compiler: gcc (GCC) 8.0.1 20180413 (experimental)
syz repro:
https://syzkaller.appspot.com/x/repro.syz?x=15e03201400000
C reproducer:
https://syzkaller.appspot.com/x/repro.c?x=14c0b596400000
IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by:
syzbot+bb378a...@syzkaller.appspotmail.com
device lo entered promiscuous mode
IPv6: RTM_NEWROUTE with no NLM_F_CREATE or NLM_F_REPLACE
IPv6: NLM_F_CREATE should be set when creating new route
IPv6: RTM_NEWROUTE with no NLM_F_CREATE or NLM_F_REPLACE
==================================================================
BUG: KASAN: use-after-free in ip6_route_mpath_notify+0xc2/0xd0
net/ipv6/route.c:3131
Read of size 4 at addr ffff8801d2bd5cd0 by task syz-executor972/1971
CPU: 1 PID: 1971 Comm: syz-executor972 Not tainted 4.14.67+ #2
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0xb9/0x11b lib/dump_stack.c:53
print_address_description+0x60/0x22b mm/kasan/report.c:252
kasan_report_error mm/kasan/report.c:351 [inline]
kasan_report.cold.6+0x11b/0x2dd mm/kasan/report.c:409
ip6_route_mpath_notify+0xc2/0xd0 net/ipv6/route.c:3131
ip6_route_multipath_add+0xbfc/0x1100 net/ipv6/route.c:3251
inet6_rtm_newroute+0xa4/0x110 net/ipv6/route.c:3339
rtnetlink_rcv_msg+0x3bb/0xb30 net/core/rtnetlink.c:4255
netlink_rcv_skb+0x130/0x390 net/netlink/af_netlink.c:2432
netlink_unicast_kernel net/netlink/af_netlink.c:1286 [inline]
netlink_unicast+0x46d/0x620 net/netlink/af_netlink.c:1312
netlink_sendmsg+0x664/0xbe0 net/netlink/af_netlink.c:1877
sock_sendmsg_nosec net/socket.c:645 [inline]
sock_sendmsg+0xb5/0x100 net/socket.c:655
___sys_sendmsg+0x741/0x890 net/socket.c:2061
__sys_sendmsg+0xca/0x170 net/socket.c:2095
SYSC_sendmsg net/socket.c:2106 [inline]
SyS_sendmsg+0x27/0x40 net/socket.c:2102
do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x440e19
RSP: 002b:00007ffdb0d67f98 EFLAGS: 00000213 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000440e19
RDX: 0000000000000000 RSI: 0000000020000340 RDI: 0000000000000003
RBP: 0000000000000000 R08: 00000000004002c8 R09: 00000000004002c8
R10: 0000000002122880 R11: 0000000000000213 R12: 0000000000007e96
R13: 0000000000401df0 R14: 0000000000000000 R15: 0000000000000000
Allocated by task 1971:
save_stack mm/kasan/kasan.c:447 [inline]
set_track mm/kasan/kasan.c:459 [inline]
kasan_kmalloc.part.1+0x4f/0xd0 mm/kasan/kasan.c:551
slab_post_alloc_hook mm/slab.h:442 [inline]
slab_alloc_node mm/slub.c:2723 [inline]
slab_alloc mm/slub.c:2731 [inline]
kmem_cache_alloc+0xe4/0x2b0 mm/slub.c:2736
dst_alloc+0xb1/0x1a0 net/core/dst.c:107
__ip6_dst_alloc+0x2f/0x60 net/ipv6/route.c:355
ip6_dst_alloc+0x2a/0x1d0 net/ipv6/route.c:368
ip6_route_info_create+0x339/0x23d0 net/ipv6/route.c:1953
ip6_route_multipath_add+0x60b/0x1100 net/ipv6/route.c:3190
inet6_rtm_newroute+0xa4/0x110 net/ipv6/route.c:3339
rtnetlink_rcv_msg+0x3bb/0xb30 net/core/rtnetlink.c:4255
netlink_rcv_skb+0x130/0x390 net/netlink/af_netlink.c:2432
netlink_unicast_kernel net/netlink/af_netlink.c:1286 [inline]
netlink_unicast+0x46d/0x620 net/netlink/af_netlink.c:1312
netlink_sendmsg+0x664/0xbe0 net/netlink/af_netlink.c:1877
sock_sendmsg_nosec net/socket.c:645 [inline]
sock_sendmsg+0xb5/0x100 net/socket.c:655
___sys_sendmsg+0x741/0x890 net/socket.c:2061
__sys_sendmsg+0xca/0x170 net/socket.c:2095
SYSC_sendmsg net/socket.c:2106 [inline]
SyS_sendmsg+0x27/0x40 net/socket.c:2102
do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289
entry_SYSCALL_64_after_hwframe+0x42/0xb7
Freed by task 1971:
save_stack mm/kasan/kasan.c:447 [inline]
set_track mm/kasan/kasan.c:459 [inline]
kasan_slab_free+0xac/0x190 mm/kasan/kasan.c:524
slab_free_hook mm/slub.c:1389 [inline]
slab_free_freelist_hook mm/slub.c:1410 [inline]
slab_free mm/slub.c:2966 [inline]
kmem_cache_free+0x12d/0x350 mm/slub.c:2988
dst_destroy+0x1c7/0x2c0 net/core/dst.c:138
dst_release_immediate+0x45/0x60 net/core/dst.c:203
fib6_add+0x18c5/0x2c30 net/ipv6/ip6_fib.c:1233
__ip6_ins_rt+0x61/0x80 net/ipv6/route.c:945
ip6_route_multipath_add+0xb1c/0x1100 net/ipv6/route.c:3215
inet6_rtm_newroute+0xa4/0x110 net/ipv6/route.c:3339
rtnetlink_rcv_msg+0x3bb/0xb30 net/core/rtnetlink.c:4255
netlink_rcv_skb+0x130/0x390 net/netlink/af_netlink.c:2432
netlink_unicast_kernel net/netlink/af_netlink.c:1286 [inline]
netlink_unicast+0x46d/0x620 net/netlink/af_netlink.c:1312
netlink_sendmsg+0x664/0xbe0 net/netlink/af_netlink.c:1877
sock_sendmsg_nosec net/socket.c:645 [inline]
sock_sendmsg+0xb5/0x100 net/socket.c:655
___sys_sendmsg+0x741/0x890 net/socket.c:2061
__sys_sendmsg+0xca/0x170 net/socket.c:2095
SYSC_sendmsg net/socket.c:2106 [inline]
SyS_sendmsg+0x27/0x40 net/socket.c:2102
do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289
entry_SYSCALL_64_after_hwframe+0x42/0xb7
The buggy address belongs to the object at ffff8801d2bd5c00
which belongs to the cache ip6_dst_cache of size 384
The buggy address is located 208 bytes inside of
384-byte region [ffff8801d2bd5c00, ffff8801d2bd5d80)
The buggy address belongs to the page:
page:ffffea00074af500 count:1 mapcount:0 mapping: (null) index:0x0
compound_mapcount: 0
flags: 0x4000000000008100(slab|head)
raw: 4000000000008100 0000000000000000 0000000000000000 0000000180120012
raw: dead000000000100 dead000000000200 ffff8801d5358a00 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff8801d2bd5b80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
ffff8801d2bd5c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
> ffff8801d2bd5c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8801d2bd5d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8801d2bd5d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
---
This bug is generated by a bot. It may contain errors.
See
https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at
syzk...@googlegroups.com.
syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
syzbot can test patches for this bug, for details see:
https://goo.gl/tpsmEJ#testing-patches