Hello,
syzbot found the following issue on:
HEAD commit: 3242aa3a Linux 4.14.222
git tree: linux-4.14.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=161698ead00000
kernel config:
https://syzkaller.appspot.com/x/.config?x=d6fee509440d713f
dashboard link:
https://syzkaller.appspot.com/bug?extid=a01494819e2b895c7be1
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+a01494...@syzkaller.appspotmail.com
==================================================================
BUG: KASAN: use-after-free in __read_once_size include/linux/compiler.h:183 [inline]
BUG: KASAN: use-after-free in atomic_read arch/x86/include/asm/atomic.h:27 [inline]
BUG: KASAN: use-after-free in inet_twsk_purge+0x530/0x5a0 net/ipv4/inet_timewait_sock.c:276
Read of size 4 at addr ffff8880a9c50144 by task kworker/u4:2/57
CPU: 1 PID: 57 Comm: kworker/u4:2 Not tainted 4.14.222-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/0x281 lib/dump_stack.c:58
print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252
kasan_report_error.cold+0x8a/0x191 mm/kasan/report.c:351
kasan_report mm/kasan/report.c:409 [inline]
__asan_report_load4_noabort+0x68/0x70 mm/kasan/report.c:429
__read_once_size include/linux/compiler.h:183 [inline]
atomic_read arch/x86/include/asm/atomic.h:27 [inline]
inet_twsk_purge+0x530/0x5a0 net/ipv4/inet_timewait_sock.c:276
ops_exit_list+0xf9/0x150 net/core/net_namespace.c:145
cleanup_net+0x3b3/0x840 net/core/net_namespace.c:484
process_one_work+0x793/0x14a0 kernel/workqueue.c:2116
worker_thread+0x5cc/0xff0 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 7989:
save_stack mm/kasan/kasan.c:447 [inline]
set_track mm/kasan/kasan.c:459 [inline]
kasan_kmalloc+0xeb/0x160 mm/kasan/kasan.c:551
kmem_cache_alloc+0x124/0x3c0 mm/slab.c:3552
kmem_cache_zalloc include/linux/slab.h:651 [inline]
net_alloc net/core/net_namespace.c:362 [inline]
copy_net_ns+0xf7/0x440 net/core/net_namespace.c:402
create_new_namespaces+0x375/0x720 kernel/nsproxy.c:107
unshare_nsproxy_namespaces+0xa1/0x1d0 kernel/nsproxy.c:206
SYSC_unshare kernel/fork.c:2412 [inline]
SyS_unshare+0x308/0x7f0 kernel/fork.c:2362
do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x46/0xbb
Freed by task 7276:
save_stack mm/kasan/kasan.c:447 [inline]
set_track mm/kasan/kasan.c:459 [inline]
kasan_slab_free+0xc3/0x1a0 mm/kasan/kasan.c:524
__cache_free mm/slab.c:3496 [inline]
kmem_cache_free+0x7c/0x2b0 mm/slab.c:3758
net_free net/core/net_namespace.c:378 [inline]
net_drop_ns+0x63/0x70 net/core/net_namespace.c:385
cleanup_net+0x526/0x840 net/core/net_namespace.c:502
process_one_work+0x793/0x14a0 kernel/workqueue.c:2116
worker_thread+0x5cc/0xff0 kernel/workqueue.c:2250
kthread+0x30d/0x420 kernel/kthread.c:232
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404
The buggy address belongs to the object at ffff8880a9c50140
which belongs to the cache net_namespace of size 8832
The buggy address is located 4 bytes inside of
8832-byte region [ffff8880a9c50140, ffff8880a9c523c0)
The buggy address belongs to the page:
page:ffffea0002a71400 count:1 mapcount:0 mapping:ffff8880a9c50140 index:0x0 compound_mapcount: 0
flags: 0xfff00000008100(slab|head)
raw: 00fff00000008100 ffff8880a9c50140 0000000000000000 0000000100000001
raw: ffffea000178ee20 ffffea000161be20 ffff88823f8bbc80 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
ffff8880a9c50000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8880a9c50080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8880a9c50100: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb
^
ffff8880a9c50180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880a9c50200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
---
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.