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

4 views
Skip to first unread message

syzbot

unread,
Jul 15, 2020, 2:21:19 AM7/15/20
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: b850307b Linux 4.14.184
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=156716c7100000
kernel config: https://syzkaller.appspot.com/x/.config?x=ddc0f08dd6b981c5
dashboard link: https://syzkaller.appspot.com/bug?extid=e149342c94253985a2e8
compiler: gcc (GCC) 9.0.0 20181231 (experimental)

Unfortunately, I don't have any reproducer for this issue yet.

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+e14934...@syzkaller.appspotmail.com

==================================================================
BUG: KASAN: slab-out-of-bounds in rds_tcp_kill_sock net/rds/tcp.c:531 [inline]
BUG: KASAN: slab-out-of-bounds in rds_tcp_dev_event+0x8ef/0xa10 net/rds/tcp.c:573
Read of size 8 at addr ffff888052575dc0 by task kworker/u4:6/9135

CPU: 0 PID: 9135 Comm: kworker/u4:6 Not tainted 4.14.184-syzkaller #0
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:17 [inline]
dump_stack+0x1b2/0x283 lib/dump_stack.c:58
print_address_description.cold+0x54/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/0x2b9 mm/kasan/report.c:393
rds_tcp_kill_sock net/rds/tcp.c:531 [inline]
rds_tcp_dev_event+0x8ef/0xa10 net/rds/tcp.c:573
notifier_call_chain+0x107/0x1a0 kernel/notifier.c:93
call_netdevice_notifiers net/core/dev.c:1687 [inline]
netdev_run_todo+0x1f6/0x710 net/core/dev.c:7923
default_device_exit_batch+0x2e7/0x380 net/core/dev.c:8743
ops_exit_list.isra.0+0xef/0x140 net/core/net_namespace.c:145
cleanup_net+0x3bb/0x820 net/core/net_namespace.c:484
process_one_work+0x7c0/0x14c0 kernel/workqueue.c:2116
worker_thread+0x5d7/0x1080 kernel/workqueue.c:2250
kthread+0x30d/0x420 kernel/kthread.c:232
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404

Allocated by task 3638:
save_stack mm/kasan/kasan.c:447 [inline]
set_track mm/kasan/kasan.c:459 [inline]
kasan_kmalloc.part.0+0x4f/0xd0 mm/kasan/kasan.c:551
kmem_cache_alloc+0x124/0x3c0 mm/slab.c:3552
getname_flags+0xc8/0x550 fs/namei.c:138
user_path_at_empty+0x2a/0x50 fs/namei.c:2631
SYSC_readlinkat fs/stat.c:394 [inline]
SyS_readlinkat+0xa8/0x270 fs/stat.c:382
do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x46/0xbb

Freed by task 3638:
save_stack mm/kasan/kasan.c:447 [inline]
set_track mm/kasan/kasan.c:459 [inline]
kasan_slab_free+0xaf/0x190 mm/kasan/kasan.c:524
__cache_free mm/slab.c:3496 [inline]
kmem_cache_free+0x7c/0x2b0 mm/slab.c:3758
putname+0xcd/0x110 fs/namei.c:259
filename_lookup+0x23a/0x380 fs/namei.c:2386
SYSC_readlinkat fs/stat.c:394 [inline]
SyS_readlinkat+0xa8/0x270 fs/stat.c:382
do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x46/0xbb

The buggy address belongs to the object at ffff888052574280
which belongs to the cache names_cache of size 4096
The buggy address is located 2880 bytes to the right of
4096-byte region [ffff888052574280, ffff888052575280)
The buggy address belongs to the page:
page:ffffea0001495d00 count:1 mapcount:0 mapping:ffff888052574280 index:0x0 compound_mapcount: 0
flags: 0xfffe0000008100(slab|head)
raw: 00fffe0000008100 ffff888052574280 0000000000000000 0000000100000001
raw: ffffea0001592820 ffffea00017c1b20 ffff8880aa9dacc0 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
ffff888052575c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888052575d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888052575d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff888052575e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888052575e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================


---
This report 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 issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

syzbot

unread,
Dec 6, 2020, 11:15:07 AM12/6/20
to syzkaller...@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