syzbot


KASAN: use-after-free Read in padata_do_parallel

Status: auto-closed as invalid on 2021/04/06 00:49
Reported-by: syzbot+eb362d2fc848b45a8e71@syzkaller.appspotmail.com
First crash: 1447d, last: 1447d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 KASAN: use-after-free Read in padata_do_parallel (2) 1 1325d 1325d 0/1 auto-closed as invalid on 2021/08/05 11:43

Sample crash report:
IPv6: ADDRCONF(NETDEV_CHANGE): veth56: link becomes ready
IPv6: ADDRCONF(NETDEV_CHANGE): veth58: link becomes ready
IPv6: ADDRCONF(NETDEV_CHANGE): veth60: link becomes ready
==================================================================
BUG: KASAN: use-after-free in __list_add_valid+0x93/0xa0 lib/list_debug.c:26
Read of size 8 at addr ffff888053724bd0 by task syz-executor.3/32157

CPU: 0 PID: 32157 Comm: syz-executor.3 Not tainted 4.14.210-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x1b2/0x283 lib/dump_stack.c:58
 print_address_description.cold+0x54/0x1d3 mm/kasan/report.c:252
 kasan_report_error.cold+0x8a/0x194 mm/kasan/report.c:351
 kasan_report mm/kasan/report.c:409 [inline]
 __asan_report_load8_noabort+0x68/0x70 mm/kasan/report.c:430
 __list_add_valid+0x93/0xa0 lib/list_debug.c:26
 __list_add include/linux/list.h:60 [inline]
 list_add_tail include/linux/list.h:93 [inline]
 padata_do_parallel+0x304/0x5d0 kernel/padata.c:140
 pcrypt_aead_encrypt+0x356/0x440 crypto/pcrypt.c:172
 crypto_aead_encrypt include/crypto/aead.h:330 [inline]
 tls_do_encryption net/tls/tls_sw.c:234 [inline]
 tls_push_record+0x938/0x1270 net/tls/tls_sw.c:270
 tls_push_pending_closed_record net/tls/tls_main.c:205 [inline]
 tls_push_pending_closed_record net/tls/tls_main.c:198 [inline]
 tls_complete_pending_work include/net/tls.h:159 [inline]
 tls_sk_proto_close+0x5d2/0x8b0 net/tls/tls_main.c:269
 inet_release+0xdf/0x1b0 net/ipv4/af_inet.c:425
 inet6_release+0x4c/0x70 net/ipv6/af_inet6.c:450
 __sock_release+0xcd/0x2b0 net/socket.c:602
 sock_close+0x15/0x20 net/socket.c:1139
 __fput+0x25f/0x7a0 fs/file_table.c:210
 task_work_run+0x11f/0x190 kernel/task_work.c:113
 tracehook_notify_resume include/linux/tracehook.h:191 [inline]
 exit_to_usermode_loop+0x1ad/0x200 arch/x86/entry/common.c:164
 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:270 [inline]
 do_syscall_64+0x4a3/0x640 arch/x86/entry/common.c:297
 entry_SYSCALL_64_after_hwframe+0x46/0xbb
RIP: 0033:0x417a51
RSP: 002b:00007ffda16df850 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000009 RCX: 0000000000417a51
RDX: 0000000000000000 RSI: 000000003b50b7de RDI: 0000000000000008
RBP: 0000000000000001 R08: 000000000001cd3b R09: 000000003b50b7de
R10: 000000003b50b7e2 R11: 0000000000000293 R12: 000000000119ca00
R13: 000000000119ca00 R14: 00000000000003e8 R15: 000000000119c034

Allocated by task 32161:
 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
 __do_kmalloc mm/slab.c:3720 [inline]
 __kmalloc+0x15a/0x400 mm/slab.c:3729
 kmalloc include/linux/slab.h:493 [inline]
 kzalloc include/linux/slab.h:661 [inline]
 tls_push_record+0xfa/0x1270 net/tls/tls_sw.c:250
 tls_sw_sendpage+0x760/0xb50 net/tls/tls_sw.c:617
 inet_sendpage+0x155/0x590 net/ipv4/af_inet.c:779
 kernel_sendpage net/socket.c:3407 [inline]
 sock_sendpage+0xdf/0x140 net/socket.c:871
 pipe_to_sendpage+0x226/0x2d0 fs/splice.c:451
 splice_from_pipe_feed fs/splice.c:502 [inline]
 __splice_from_pipe+0x326/0x7a0 fs/splice.c:626
 splice_from_pipe fs/splice.c:661 [inline]
 generic_splice_sendpage+0xc1/0x110 fs/splice.c:832
 do_splice_from fs/splice.c:851 [inline]
 direct_splice_actor+0x115/0x160 fs/splice.c:1018
 splice_direct_to_actor+0x27c/0x730 fs/splice.c:973
 do_splice_direct+0x164/0x210 fs/splice.c:1061
 do_sendfile+0x47f/0xb30 fs/read_write.c:1441
 SYSC_sendfile64 fs/read_write.c:1502 [inline]
 SyS_sendfile64+0xff/0x110 fs/read_write.c:1488
 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x46/0xbb

Freed by task 32161:
 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]
 kfree+0xc9/0x250 mm/slab.c:3815
 tls_push_record+0xc3b/0x1270 net/tls/tls_sw.c:293
 tls_sw_sendpage+0x760/0xb50 net/tls/tls_sw.c:617
 inet_sendpage+0x155/0x590 net/ipv4/af_inet.c:779
 kernel_sendpage net/socket.c:3407 [inline]
 sock_sendpage+0xdf/0x140 net/socket.c:871
 pipe_to_sendpage+0x226/0x2d0 fs/splice.c:451
 splice_from_pipe_feed fs/splice.c:502 [inline]
 __splice_from_pipe+0x326/0x7a0 fs/splice.c:626
 splice_from_pipe fs/splice.c:661 [inline]
 generic_splice_sendpage+0xc1/0x110 fs/splice.c:832
 do_splice_from fs/splice.c:851 [inline]
 direct_splice_actor+0x115/0x160 fs/splice.c:1018
 splice_direct_to_actor+0x27c/0x730 fs/splice.c:973
 do_splice_direct+0x164/0x210 fs/splice.c:1061
 do_sendfile+0x47f/0xb30 fs/read_write.c:1441
 SYSC_sendfile64 fs/read_write.c:1502 [inline]
 SyS_sendfile64+0xff/0x110 fs/read_write.c:1488
 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 ffff888053724b80
 which belongs to the cache kmalloc-256 of size 256
The buggy address is located 80 bytes inside of
 256-byte region [ffff888053724b80, ffff888053724c80)
The buggy address belongs to the page:
page:ffffea00014dc900 count:1 mapcount:0 mapping:ffff888053724040 index:0x0
flags: 0xfff00000000100(slab)
raw: 00fff00000000100 ffff888053724040 0000000000000000 000000010000000c
raw: ffffea00025c5be0 ffffea000267cde0 ffff88813fe807c0 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff888053724a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff888053724b00: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc
>ffff888053724b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                                 ^
 ffff888053724c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888053724c80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/12/07 00:49 linux-4.14.y c196b3a9c83a c521566d .config console log report info ci2-linux-4-14
* Struck through repros no longer work on HEAD.