KASAN: use-after-free Read in rds_tcp_conn_free

7 views
Skip to first unread message

syzbot

unread,
Apr 25, 2019, 6:39:06 AM4/25/19
to syzkaller...@googlegroups.com
Hello,

syzbot found the following crash on:

HEAD commit: 68d7a45e Linux 4.14.113
git tree: linux-4.14.y
console output: https://syzkaller.appspot.com/x/log.txt?x=15c1c4cca00000
kernel config: https://syzkaller.appspot.com/x/.config?x=dbf1fde4d7489e1c
dashboard link: https://syzkaller.appspot.com/bug?extid=dea32494dedeba904c24
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+dea324...@syzkaller.appspotmail.com

team0 (unregistering): Port device team_slave_0 removed
bond0 (unregistering): Releasing backup interface bond_slave_1
bond0 (unregistering): Releasing backup interface bond_slave_0
bond0 (unregistering): Released all slaves
==================================================================
BUG: KASAN: use-after-free in __list_del_entry_valid+0xe6/0xf5
lib/list_debug.c:51
Read of size 8 at addr ffff888087f85c98 by task kworker/u4:3/2237

CPU: 1 PID: 2237 Comm: kworker/u4:3 Not tainted 4.14.113 #3
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+0x138/0x19c lib/dump_stack.c:53
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+0xaf/0x2b5 mm/kasan/report.c:393
__asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:430
__list_del_entry_valid+0xe6/0xf5 lib/list_debug.c:51
__list_del_entry include/linux/list.h:117 [inline]
list_del include/linux/list.h:125 [inline]
rds_tcp_conn_free+0x90/0x1d0 net/rds/tcp.c:310
rds_conn_path_destroy net/rds/connection.c:408 [inline]
rds_conn_destroy+0x4c1/0x750 net/rds/connection.c:439
rds_tcp_kill_sock net/rds/tcp.c:545 [inline]
rds_tcp_dev_event+0x7b7/0xa70 net/rds/tcp.c:573
notifier_call_chain+0x116/0x1b0 kernel/notifier.c:93
__raw_notifier_call_chain kernel/notifier.c:394 [inline]
raw_notifier_call_chain+0x2e/0x40 kernel/notifier.c:401
call_netdevice_notifiers_info+0x56/0x70 net/core/dev.c:1671
call_netdevice_notifiers net/core/dev.c:1687 [inline]
netdev_run_todo+0x215/0x770 net/core/dev.c:7904
rtnl_unlock+0xe/0x10 net/core/rtnetlink.c:106
default_device_exit_batch+0x32a/0x3d0 net/core/dev.c:8722
ops_exit_list.isra.0+0x105/0x160 net/core/net_namespace.c:145
cleanup_net+0x3ba/0x880 net/core/net_namespace.c:484
process_one_work+0x868/0x1610 kernel/workqueue.c:2114
worker_thread+0x5d9/0x1050 kernel/workqueue.c:2248
kthread+0x31c/0x430 kernel/kthread.c:232
ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:402

Allocated by task 14144:
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
kasan_slab_alloc+0xf/0x20 mm/kasan/kasan.c:489
kmem_cache_alloc+0x12e/0x780 mm/slab.c:3552
rds_tcp_conn_alloc+0x4f/0x290 net/rds/tcp.c:279
__rds_conn_create+0xc57/0x1770 net/rds/connection.c:223
rds_conn_create_outgoing+0x3b/0x50 net/rds/connection.c:303
rds_sendmsg+0xa90/0x1db0 net/rds/send.c:1120
sock_sendmsg_nosec net/socket.c:646 [inline]
sock_sendmsg+0xd0/0x110 net/socket.c:656
SYSC_sendto+0x206/0x310 net/socket.c:1763
SyS_sendto+0x40/0x50 net/socket.c:1731
do_syscall_64+0x1eb/0x630 arch/x86/entry/common.c:289
entry_SYSCALL_64_after_hwframe+0x42/0xb7

Freed by task 2237:
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]
kmem_cache_free+0x83/0x2b0 mm/slab.c:3758
rds_tcp_conn_free+0x73/0x1d0 net/rds/tcp.c:313
rds_conn_path_destroy net/rds/connection.c:408 [inline]
rds_conn_destroy+0x4c1/0x750 net/rds/connection.c:439
rds_tcp_kill_sock net/rds/tcp.c:545 [inline]
rds_tcp_dev_event+0x7b7/0xa70 net/rds/tcp.c:573
notifier_call_chain+0x116/0x1b0 kernel/notifier.c:93
__raw_notifier_call_chain kernel/notifier.c:394 [inline]
raw_notifier_call_chain+0x2e/0x40 kernel/notifier.c:401
call_netdevice_notifiers_info+0x56/0x70 net/core/dev.c:1671
call_netdevice_notifiers net/core/dev.c:1687 [inline]
netdev_run_todo+0x215/0x770 net/core/dev.c:7904
rtnl_unlock+0xe/0x10 net/core/rtnetlink.c:106
default_device_exit_batch+0x32a/0x3d0 net/core/dev.c:8722
ops_exit_list.isra.0+0x105/0x160 net/core/net_namespace.c:145
cleanup_net+0x3ba/0x880 net/core/net_namespace.c:484
process_one_work+0x868/0x1610 kernel/workqueue.c:2114
worker_thread+0x5d9/0x1050 kernel/workqueue.c:2248
kthread+0x31c/0x430 kernel/kthread.c:232
ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:402

The buggy address belongs to the object at ffff888087f85c98
which belongs to the cache rds_tcp_connection of size 504
The buggy address is located 0 bytes inside of
504-byte region [ffff888087f85c98, ffff888087f85e90)
The buggy address belongs to the page:
page:ffffea00021fe140 count:1 mapcount:0 mapping:ffff888087f85040 index:0x0
flags: 0x1fffc0000000100(slab)
raw: 01fffc0000000100 ffff888087f85040 0000000000000000 0000000100000006
raw: ffff88809b659348 ffffea000169e2e0 ffff8882161e64c0 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
ffff888087f85b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888087f85c00: fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc fc
> ffff888087f85c80: fc fc fc fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888087f85d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888087f85d80: 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.

syzbot

unread,
Sep 17, 2021, 3:43:14 AM9/17/21
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