Hello,
syzbot found the following crash on:
HEAD commit: e0f8b8a6 Linux 4.14.170
git tree: linux-4.14.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=1682894ee00000
kernel config:
https://syzkaller.appspot.com/x/.config?x=633dd9db249084f5
dashboard link:
https://syzkaller.appspot.com/bug?extid=de475a73984b7512adb2
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
Unfortunately, I don't have any reproducer for this crash yet.
IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by:
syzbot+de475a...@syzkaller.appspotmail.com
(unnamed net_device) (uninitialized): Unable to set up delay as MII monitoring is disabled
==================================================================
batman_adv: Cannot find parent device
BUG: KASAN: use-after-free in ex_handler_refcount+0x162/0x1a0 arch/x86/mm/extable.c:49
Write of size 4 at addr ffff8880a40ea5bc by task syz-executor.3/12157
CPU: 0 PID: 12157 Comm: syz-executor.3 Not tainted 4.14.170-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x142/0x197 lib/dump_stack.c:58
print_address_description.cold+0x7c/0x1dc mm/kasan/report.c:252
kasan_report_error mm/kasan/report.c:351 [inline]
kasan_report mm/kasan/report.c:409 [inline]
kasan_report.cold+0xa9/0x2af mm/kasan/report.c:393
__asan_report_store4_noabort+0x17/0x20 mm/kasan/report.c:434
ex_handler_refcount+0x162/0x1a0 arch/x86/mm/extable.c:49
fixup_exception+0x8b/0xb9 arch/x86/mm/extable.c:197
do_trap_no_signal arch/x86/kernel/traps.c:208 [inline]
do_trap+0x65/0x250 arch/x86/kernel/traps.c:257
do_error_trap+0x153/0x310 arch/x86/kernel/traps.c:301
do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:314
invalid_op+0x1b/0x40 arch/x86/entry/entry_64.S:963
RIP: 0010:inat_get_avx_attribute+0x3c9d/0x7ad5
RSP: 0018:ffff8880482ef6e0 EFLAGS: 00010296
RAX: 0000000000040000 RBX: ffff888048962280 RCX: ffff8880a40ea5bc
RDX: 0000000000001461 RSI: ffffffff85180e5e RDI: ffff8880a40ea380
RBP: ffff8880482ef6e8 R08: ffff88803fa2a600 R09: ffff88803fa2aec8
R10: 0000000000000000 R11: 0000000000000000 R12: ffff8880a40ea380
R13: ffffffff85e7e0d0 R14: 0000000000000000 R15: 0000000000000000
sock_put include/net/sock.h:1658 [inline]
pppol2tp_session_sock_put+0x66/0x80 net/l2tp/l2tp_ppp.c:271
l2tp_nl_cmd_session_delete+0xc4/0x1c0 net/l2tp/l2tp_netlink.c:684
genl_family_rcv_msg+0x614/0xc30 net/netlink/genetlink.c:600
genl_rcv_msg+0xb4/0x150 net/netlink/genetlink.c:625
netlink_rcv_skb+0x14f/0x3c0 net/netlink/af_netlink.c:2432
genl_rcv+0x29/0x40 net/netlink/genetlink.c:636
netlink_unicast_kernel net/netlink/af_netlink.c:1286 [inline]
netlink_unicast+0x44d/0x650 net/netlink/af_netlink.c:1312
netlink_sendmsg+0x7c4/0xc60 net/netlink/af_netlink.c:1877
sock_sendmsg_nosec net/socket.c:646 [inline]
sock_sendmsg+0xce/0x110 net/socket.c:656
___sys_sendmsg+0x70a/0x840 net/socket.c:2062
__sys_sendmsg+0xb9/0x140 net/socket.c:2096
SYSC_sendmsg net/socket.c:2107 [inline]
SyS_sendmsg+0x2d/0x50 net/socket.c:2103
do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x45b399
RSP: 002b:00007f5683da3c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007f5683da46d4 RCX: 000000000045b399
RDX: 0000000000000000 RSI: 0000000020000500 RDI: 0000000000000009
RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff
R13: 000000000000092a R14: 00000000004ca87e R15: 000000000075bf2c
Allocated by task 7496:
save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59
save_stack+0x45/0xd0 mm/kasan/kasan.c:447
set_track mm/kasan/kasan.c:459 [inline]
kasan_kmalloc mm/kasan/kasan.c:551 [inline]
kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:529
__do_kmalloc_node mm/slab.c:3682 [inline]
__kmalloc_node+0x51/0x80 mm/slab.c:3689
kmalloc_node include/linux/slab.h:530 [inline]
kvmalloc_node+0x4e/0xe0 mm/util.c:397
kvmalloc include/linux/mm.h:531 [inline]
kvmalloc_array include/linux/mm.h:547 [inline]
alloc_fdtable+0xcf/0x280 fs/file.c:120
dup_fd+0x693/0xa40 fs/file.c:315
copy_files kernel/fork.c:1304 [inline]
copy_process.part.0+0x1b5a/0x6a70 kernel/fork.c:1759
copy_process kernel/fork.c:1586 [inline]
_do_fork+0x19e/0xce0 kernel/fork.c:2070
SYSC_clone kernel/fork.c:2180 [inline]
SyS_clone+0x37/0x50 kernel/fork.c:2174
do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x42/0xb7
Freed by task 11960:
save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59
save_stack+0x45/0xd0 mm/kasan/kasan.c:447
set_track mm/kasan/kasan.c:459 [inline]
kasan_slab_free+0x75/0xc0 mm/kasan/kasan.c:524
__cache_free mm/slab.c:3496 [inline]
kfree+0xcc/0x270 mm/slab.c:3815
kvfree+0x4d/0x60 mm/util.c:416
__free_fdtable+0x34/0x80 fs/file.c:36
put_files_struct fs/file.c:425 [inline]
put_files_struct+0x233/0x2d0 fs/file.c:418
exit_files+0x83/0xb0 fs/file.c:450
do_exit+0x9ec/0x2cd0 kernel/exit.c:853
do_group_exit+0x111/0x330 kernel/exit.c:955
get_signal+0x381/0x1cd0 kernel/signal.c:2418
do_signal+0x86/0x19a0 arch/x86/kernel/signal.c:814
exit_to_usermode_loop+0x15c/0x220 arch/x86/entry/common.c:160
prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline]
syscall_return_slowpath arch/x86/entry/common.c:270 [inline]
do_syscall_64+0x4bc/0x640 arch/x86/entry/common.c:297
entry_SYSCALL_64_after_hwframe+0x42/0xb7
The buggy address belongs to the object at ffff8880a40ea380
which belongs to the cache kmalloc-2048 of size 2048
The buggy address is located 572 bytes inside of
2048-byte region [ffff8880a40ea380, ffff8880a40eab80)
The buggy address belongs to the page:
page:ffffea0002903a80 count:1 mapcount:0 mapping:ffff8880a40ea380 index:0x0 compound_mapcount: 0
flags: 0xfffe0000008100(slab|head)
raw: 00fffe0000008100 ffff8880a40ea380 0000000000000000 0000000100000003
raw: ffffea00029f9ba0 ffffea000229aa20 ffff8880aa800c40 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff8880a40ea480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880a40ea500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8880a40ea580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8880a40ea600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880a40ea680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
---
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.