Hello,
syzbot hit the following crash on upstream commit
b5dbc28762fd3fd40ba76303be0c7f707826f982 (Sat Mar 31 04:53:57 2018 +0000)
Merge tag 'kbuild-fixes-v4.16-3' of
git://
git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
syzbot dashboard link:
https://syzkaller.appspot.com/bug?extid=5ed95054538957293521
Unfortunately, I don't have any reproducer for this crash yet.
Raw console output:
https://syzkaller.appspot.com/x/log.txt?id=5286444583092224
Kernel config:
https://syzkaller.appspot.com/x/.config?id=-2760467897697295172
compiler: gcc (GCC) 7.1.1 20170620
CC: [
da...@davemloft.net linux-...@vger.kernel.org
linux...@vger.kernel.org net...@vger.kernel.org nho...@tuxdriver.com
vyas...@gmail.com]
IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by:
syzbot+5ed950...@syzkaller.appspotmail.com
It will help syzbot understand when the bug is fixed. See footer for
details.
If you forward the report, please keep this part and the footer.
IPVS: set_ctl: invalid protocol: 59
224.0.0.2:20000 lc
==================================================================
BUG: KASAN: double-free or invalid-free in sctp_endpoint_destroy
net/sctp/endpointola.c:254 [inline]
BUG: KASAN: double-free or invalid-free in sctp_endpoint_put+0x93/0x280
net/sctp/endpointola.c:297
CPU: 0 PID: 12563 Comm: syz-executor7 Not tainted 4.16.0-rc7+ #373
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+0x194/0x24d lib/dump_stack.c:53
print_address_description+0x73/0x250 mm/kasan/report.c:256
kasan_report_invalid_free+0x55/0x80 mm/kasan/report.c:336
__kasan_slab_free+0x145/0x170 mm/kasan/kasan.c:500
kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:527
__cache_free mm/slab.c:3486 [inline]
kfree+0xd9/0x260 mm/slab.c:3801
sctp_endpoint_destroy net/sctp/endpointola.c:254 [inline]
sctp_endpoint_put+0x93/0x280 net/sctp/endpointola.c:297
sctp_endpoint_free+0x71/0x90 net/sctp/endpointola.c:240
sctp_destroy_sock+0xda/0x520 net/sctp/socket.c:4591
sk_common_release+0x6b/0x2f0 net/core/sock.c:2996
sctp_close+0x464/0x9a0 net/sctp/socket.c:1563
inet_release+0xed/0x1c0 net/ipv4/af_inet.c:427
sock_release+0x8d/0x1e0 net/socket.c:595
sock_close+0x16/0x20 net/socket.c:1149
__fput+0x327/0x7e0 fs/file_table.c:209
____fput+0x15/0x20 fs/file_table.c:243
task_work_run+0x199/0x270 kernel/task_work.c:113
exit_task_work include/linux/task_work.h:22 [inline]
do_exit+0x9bb/0x1ad0 kernel/exit.c:865
do_group_exit+0x149/0x400 kernel/exit.c:968
get_signal+0x73a/0x16d0 kernel/signal.c:2469
do_signal+0x90/0x1e90 arch/x86/kernel/signal.c:809
exit_to_usermode_loop+0x258/0x2f0 arch/x86/entry/common.c:162
prepare_exit_to_usermode arch/x86/entry/common.c:196 [inline]
syscall_return_slowpath arch/x86/entry/common.c:265 [inline]
do_syscall_64+0x6ec/0x940 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x454e79
RSP: 002b:00007f2521de0ce8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 000000000072bf80 RCX: 0000000000454e79
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000000072bf80
RBP: 000000000072bf80 R08: 0000000000000000 R09: 000000000072bf58
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000a3e81f R14: 00007f2521de19c0 R15: 0000000000000001
Allocated by task 12563:
save_stack+0x43/0xd0 mm/kasan/kasan.c:447
set_track mm/kasan/kasan.c:459 [inline]
kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:552
kmem_cache_alloc_trace+0x136/0x740 mm/slab.c:3608
kmalloc include/linux/slab.h:512 [inline]
kzalloc include/linux/slab.h:701 [inline]
sctp_endpoint_init net/sctp/endpointola.c:66 [inline]
sctp_endpoint_new+0x154/0xee0 net/sctp/endpointola.c:195
sctp_init_sock+0xc48/0x13b0 net/sctp/socket.c:4538
inet_create+0x953/0xf50 net/ipv4/af_inet.c:378
__sock_create+0x4d4/0x850 net/socket.c:1285
sock_create net/socket.c:1325 [inline]
SYSC_socket net/socket.c:1355 [inline]
SyS_socket+0xeb/0x1d0 net/socket.c:1335
do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287
entry_SYSCALL_64_after_hwframe+0x42/0xb7
Freed by task 12544:
save_stack+0x43/0xd0 mm/kasan/kasan.c:447
set_track mm/kasan/kasan.c:459 [inline]
__kasan_slab_free+0x11a/0x170 mm/kasan/kasan.c:520
kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:527
__cache_free mm/slab.c:3486 [inline]
kfree+0xd9/0x260 mm/slab.c:3801
sctp_endpoint_destroy net/sctp/endpointola.c:254 [inline]
sctp_endpoint_put+0x93/0x280 net/sctp/endpointola.c:297
sctp_endpoint_free+0x71/0x90 net/sctp/endpointola.c:240
sctp_destroy_sock+0xda/0x520 net/sctp/socket.c:4591
sctp_v6_destroy_sock+0x15/0x20 net/sctp/socket.c:8573
sk_common_release+0x6b/0x2f0 net/core/sock.c:2996
sctp_close+0x464/0x9a0 net/sctp/socket.c:1563
inet_release+0xed/0x1c0 net/ipv4/af_inet.c:427
inet6_release+0x50/0x70 net/ipv6/af_inet6.c:435
sock_release+0x8d/0x1e0 net/socket.c:595
sock_close+0x16/0x20 net/socket.c:1149
__fput+0x327/0x7e0 fs/file_table.c:209
____fput+0x15/0x20 fs/file_table.c:243
task_work_run+0x199/0x270 kernel/task_work.c:113
exit_task_work include/linux/task_work.h:22 [inline]
do_exit+0x9bb/0x1ad0 kernel/exit.c:865
do_group_exit+0x149/0x400 kernel/exit.c:968
get_signal+0x73a/0x16d0 kernel/signal.c:2469
do_signal+0x90/0x1e90 arch/x86/kernel/signal.c:809
exit_to_usermode_loop+0x258/0x2f0 arch/x86/entry/common.c:162
prepare_exit_to_usermode arch/x86/entry/common.c:196 [inline]
syscall_return_slowpath arch/x86/entry/common.c:265 [inline]
do_syscall_64+0x6ec/0x940 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x42/0xb7
The buggy address belongs to the object at ffff8801d32b91c0
which belongs to the cache kmalloc-32 of size 32
The buggy address is located 0 bytes inside of
32-byte region [ffff8801d32b91c0, ffff8801d32b91e0)
The buggy address belongs to the page:
page:ffffea00074cae40 count:1 mapcount:0 mapping:ffff8801d32b9000
index:0xffff8801d32b9fc1
flags: 0x2fffc0000000100(slab)
raw: 02fffc0000000100 ffff8801d32b9000 ffff8801d32b9fc1 0000000100000031
raw: ffffea00071c49e0 ffffea00075e43e0 ffff8801dac001c0 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff8801d32b9080: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc
ffff8801d32b9100: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc
> ffff8801d32b9180: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc
^
ffff8801d32b9200: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc
ffff8801d32b9280: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc
==================================================================
---
This bug is generated by a dumb bot. It may contain errors.
See
https://goo.gl/tpsmEJ for details.
Direct all questions to
syzk...@googlegroups.com.
syzbot will keep track of this bug report.
If you forgot to add the Reported-by tag, once the fix for this bug is
merged
into any tree, please reply to this email with:
#syz fix: exact-commit-title
To mark this as a duplicate of another syzbot report, please reply with:
#syz dup: exact-subject-of-another-report
If it's a one-off invalid bug report, please reply with:
#syz invalid
Note: if the crash happens again, it will cause creation of a new bug
report.
Note: all commands must start from beginning of the line in the email body.
To upstream this report, please reply with:
#syz upstream