KASAN: slab-out-of-bounds Read in icmp_sk_exit

8 views
Skip to first unread message

syzbot

unread,
Feb 4, 2019, 11:43:07 AM2/4/19
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: cc7335786f72 socket: fix for Add SO_TIMESTAMP[NS]_NEW
git tree: net-next
console output: https://syzkaller.appspot.com/x/log.txt?x=148c960f400000
kernel config: https://syzkaller.appspot.com/x/.config?x=33ad02b9305759c3
dashboard link: https://syzkaller.appspot.com/bug?extid=b22156514878ba5fbf01
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
CC: [da...@davemloft.net kuz...@ms2.inr.ac.ru
linux-...@vger.kernel.org net...@vger.kernel.org yosh...@linux-ipv6.org
net...@vger.kernel.org]

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+b22156...@syzkaller.appspotmail.com

==================================================================
BUG: KASAN: slab-out-of-bounds in inet_ctl_sock_destroy
include/net/inet_common.h:56 [inline]
BUG: KASAN: slab-out-of-bounds in icmp_sk_exit+0x1ce/0x1f0
net/ipv4/icmp.c:1187
Read of size 8 at addr ffff88806083e2e0 by task kworker/u4:2/26

CPU: 0 PID: 26 Comm: kworker/u4:2 Not tainted 5.0.0-rc4+ #45
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Workqueue: netns cleanup_net
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_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:135
inet_ctl_sock_destroy include/net/inet_common.h:56 [inline]
icmp_sk_exit+0x1ce/0x1f0 net/ipv4/icmp.c:1187
ops_exit_list.isra.0+0xb0/0x160 net/core/net_namespace.c:153
cleanup_net+0x3fb/0x960 net/core/net_namespace.c:551
process_one_work+0x98e/0x1760 kernel/workqueue.c:2153
worker_thread+0x98/0xe40 kernel/workqueue.c:2296
kthread+0x357/0x430 kernel/kthread.c:246
ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352

Allocated by task 20569:
save_stack+0x45/0xd0 mm/kasan/common.c:73
set_track mm/kasan/common.c:85 [inline]
__kasan_kmalloc mm/kasan/common.c:496 [inline]
__kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:469
kasan_kmalloc mm/kasan/common.c:504 [inline]
kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:411
kmem_cache_alloc+0x12d/0x710 mm/slab.c:3543
getname_flags fs/namei.c:140 [inline]
getname_flags+0xd6/0x5b0 fs/namei.c:129
getname fs/namei.c:211 [inline]
do_rmdir+0xb8/0x420 fs/namei.c:3907
__do_sys_rmdir fs/namei.c:3958 [inline]
__se_sys_rmdir fs/namei.c:3956 [inline]
__x64_sys_rmdir+0x36/0x40 fs/namei.c:3956
do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe

Freed by task 20569:
save_stack+0x45/0xd0 mm/kasan/common.c:73
set_track mm/kasan/common.c:85 [inline]
__kasan_slab_free+0x102/0x150 mm/kasan/common.c:458
kasan_slab_free+0xe/0x10 mm/kasan/common.c:466
__cache_free mm/slab.c:3487 [inline]
kmem_cache_free+0x86/0x260 mm/slab.c:3749
putname+0xef/0x130 fs/namei.c:261
do_rmdir+0x179/0x420 fs/namei.c:3948
__do_sys_rmdir fs/namei.c:3958 [inline]
__se_sys_rmdir fs/namei.c:3956 [inline]
__x64_sys_rmdir+0x36/0x40 fs/namei.c:3956
do_syscall_64+0x103/0x610 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe

The buggy address belongs to the object at ffff88806083e980
which belongs to the cache names_cache of size 4096
The buggy address is located 1696 bytes to the left of
4096-byte region [ffff88806083e980, ffff88806083f980)
The buggy address belongs to the page:
page:ffffea0001820f80 count:1 mapcount:0 mapping:ffff88821bc45380 index:0x0
compound_mapcount: 0
flags: 0x1fffc0000010200(slab|head)
raw: 01fffc0000010200 ffffea0002263c08 ffffea0001c2a508 ffff88821bc45380
raw: 0000000000000000 ffff88806083e980 0000000100000001 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
ffff88806083e180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88806083e200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
> ffff88806083e280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff88806083e300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88806083e380: 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#bug-status-tracking for how to communicate with
syzbot.

syzbot

unread,
Oct 25, 2019, 4:46:07 AM10/25/19
to syzkaller-upst...@googlegroups.com
Auto-closing this bug as obsolete.
Crashes did not happen for a while, no reproducer and no activity.
Reply all
Reply to author
Forward
0 new messages