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

4 views
Skip to first unread message

syzbot

unread,
Jul 15, 2018, 9:49:04 AM7/15/18
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 483d835c8189 Add linux-next specific files for 20180713
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=1448c252400000
kernel config: https://syzkaller.appspot.com/x/.config?x=60e5ac2478928314
dashboard link: https://syzkaller.appspot.com/bug?extid=f86d990244edc3651c28
compiler: gcc (GCC) 8.0.1 20180413 (experimental)
CC: [ak...@linux-foundation.org arya...@virtuozzo.com
jba...@fb.com ktk...@virtuozzo.com linux-...@vger.kernel.org
linu...@kvack.org mho...@suse.com penguin...@I-love.SAKURA.ne.jp
s...@canb.auug.org.au shak...@google.com vdavyd...@gmail.com
wi...@infradead.org ying....@intel.com]

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

==================================================================
BUG: KASAN: slab-out-of-bounds in do_shrink_slab+0xba9/0xc50 mm/vmscan.c:458
Read of size 8 at addr ffff8801b8256cb0 by task syz-executor4/23750

CPU: 0 PID: 23750 Comm: syz-executor4 Not tainted 4.18.0-rc4-next-20180713+
#7
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+0x1c9/0x2b4 lib/dump_stack.c:113
print_address_description+0x6c/0x20b mm/kasan/report.c:256
kasan_report_error mm/kasan/report.c:354 [inline]
kasan_report.cold.7+0x242/0x30d mm/kasan/report.c:412
__asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433
do_shrink_slab+0xba9/0xc50 mm/vmscan.c:458
shrink_slab_memcg mm/vmscan.c:598 [inline]
shrink_slab+0x861/0xa60 mm/vmscan.c:671
shrink_node+0x429/0x16a0 mm/vmscan.c:2735
shrink_zones mm/vmscan.c:2964 [inline]
do_try_to_free_pages+0x3e7/0x1290 mm/vmscan.c:3026
try_to_free_mem_cgroup_pages+0x49d/0xc90 mm/vmscan.c:3324
memory_high_write+0x283/0x310 mm/memcontrol.c:5611
cgroup_file_write+0x31f/0x840 kernel/cgroup/cgroup.c:3502
kernfs_fop_write+0x2ba/0x480 fs/kernfs/file.c:316
__vfs_write+0x117/0x9d0 fs/read_write.c:485
vfs_write+0x1fc/0x560 fs/read_write.c:549
ksys_write+0x101/0x260 fs/read_write.c:598
__do_sys_write fs/read_write.c:610 [inline]
__se_sys_write fs/read_write.c:607 [inline]
__x64_sys_write+0x73/0xb0 fs/read_write.c:607
do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x455ab9
Code: 1d ba fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7
48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff
ff 0f 83 eb b9 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f0054625c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f00546266d4 RCX: 0000000000455ab9
RDX: 0000000000000001 RSI: 0000000020000000 RDI: 0000000000000014
RBP: 000000000072bea0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff
R13: 00000000004c2c77 R14: 00000000004d4c80 R15: 0000000000000000

Allocated by task 13911:
save_stack+0x43/0xd0 mm/kasan/kasan.c:448
set_track mm/kasan/kasan.c:460 [inline]
kasan_kmalloc+0xc4/0xe0 mm/kasan/kasan.c:553
kmem_cache_alloc_trace+0x152/0x780 mm/slab.c:3620
kmalloc include/linux/slab.h:513 [inline]
kzalloc include/linux/slab.h:707 [inline]
snmp6_alloc_dev net/ipv6/addrconf.c:351 [inline]
ipv6_add_dev+0x626/0x13a0 net/ipv6/addrconf.c:400
addrconf_notify+0x9fb/0x27f0 net/ipv6/addrconf.c:3433
notifier_call_chain+0x180/0x390 kernel/notifier.c:93
__raw_notifier_call_chain kernel/notifier.c:394 [inline]
raw_notifier_call_chain+0x2d/0x40 kernel/notifier.c:401
call_netdevice_notifiers_info+0x3f/0x90 net/core/dev.c:1734
call_netdevice_notifiers net/core/dev.c:1752 [inline]
register_netdevice+0xb9d/0x1100 net/core/dev.c:8458
veth_newlink+0x5f5/0xa70 drivers/net/veth.c:443
rtnl_newlink+0xeff/0x1d60 net/core/rtnetlink.c:3053
rtnetlink_rcv_msg+0x46e/0xc30 net/core/rtnetlink.c:4665
netlink_rcv_skb+0x172/0x440 net/netlink/af_netlink.c:2448
rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:4683
netlink_unicast_kernel net/netlink/af_netlink.c:1310 [inline]
netlink_unicast+0x5a0/0x760 net/netlink/af_netlink.c:1336
netlink_sendmsg+0xa18/0xfc0 net/netlink/af_netlink.c:1901
sock_sendmsg_nosec net/socket.c:623 [inline]
sock_sendmsg+0xd5/0x120 net/socket.c:633
___sys_sendmsg+0x7fd/0x930 net/socket.c:2107
__sys_sendmsg+0x11d/0x290 net/socket.c:2145
__do_sys_sendmsg net/socket.c:2154 [inline]
__se_sys_sendmsg net/socket.c:2152 [inline]
__x64_sys_sendmsg+0x78/0xb0 net/socket.c:2152
do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe

Freed by task 0:
(stack is not available)

The buggy address belongs to the object at ffff8801b8256cc0
which belongs to the cache kmalloc-4096 of size 4096
The buggy address is located 16 bytes to the left of
4096-byte region [ffff8801b8256cc0, ffff8801b8257cc0)
The buggy address belongs to the page:
page:ffffea0006e09580 count:1 mapcount:0 mapping:ffff8801da800dc0 index:0x0
compound_mapcount: 0
flags: 0x2fffc0000008100(slab|head)
raw: 02fffc0000008100 ffffea0006adaa88 ffffea0006c2da88 ffff8801da800dc0
raw: 0000000000000000 ffff8801b8256cc0 0000000100000001 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
ffff8801b8256b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8801b8256c00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
> ffff8801b8256c80: fc fc fc fc fc fc fc fc 00 00 00 00 00 00 00 00
^
ffff8801b8256d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff8801b8256d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================


---
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,
Feb 22, 2019, 5:34:24 AM2/22/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