syzbot


KASAN: use-after-free Read in tipc_mcast_xmit

Status: auto-obsoleted due to no activity on 2023/04/17 09:09
Reported-by: syzbot+c429c30420ea837547cf@syzkaller.appspotmail.com
First crash: 1514d, last: 1493d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: use-after-free Read in tipc_mcast_xmit (2) tipc C done 37 1497d 1511d 15/28 fixed on 2020/11/16 12:12
upstream KASAN: use-after-free Read in tipc_mcast_xmit tipc syz 7 2159d 2166d 11/28 fixed on 2019/01/11 01:22
linux-4.19 KASAN: use-after-free Read in tipc_mcast_xmit C done 3 1485d 1508d 1/1 fixed on 2020/11/28 11:57
Last patch testing requests (1)
Created Duration User Patch Repo Result
2023/04/17 08:40 14m retest repro android12-5.4 OK log

Sample crash report:
RBP: 00007fffd8f835f0 R08: 0000000000000002 R09: 0000000600003034
R10: 0000000000200fc0 R11: 0000000000000246 R12: ffffffffffffffff
R13: 0000000000000006 R14: 0000000000000000 R15: 0000000000000000
tipc: Failed do clone local mcast rcv buffer
BUG: KASAN: use-after-free in __skb_unlink include/linux/skbuff.h:2031 [inline]
BUG: KASAN: use-after-free in __skb_dequeue include/linux/skbuff.h:2050 [inline]
BUG: KASAN: use-after-free in __skb_queue_purge include/linux/skbuff.h:2761 [inline]
BUG: KASAN: use-after-free in tipc_mcast_xmit+0x101f/0x1690 net/tipc/bcast.c:421
Read of size 8 at addr ffff8881c3085b80 by task syz-executor863/344

CPU: 0 PID: 344 Comm: syz-executor863 Not tainted 5.4.68-syzkaller-00471-g6fa60aa03b21 #0
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+0x1b0/0x21e lib/dump_stack.c:118
 print_address_description+0x96/0x5d0 mm/kasan/report.c:374
 __kasan_report+0x14b/0x1c0 mm/kasan/report.c:506
 kasan_report+0x27/0x50 mm/kasan/common.c:634
 __skb_unlink include/linux/skbuff.h:2031 [inline]
 __skb_dequeue include/linux/skbuff.h:2050 [inline]
 __skb_queue_purge include/linux/skbuff.h:2761 [inline]
 tipc_mcast_xmit+0x101f/0x1690 net/tipc/bcast.c:421
 tipc_sendmcast+0xc00/0xeb0 net/tipc/socket.c:819
 __tipc_sendmsg+0x120d/0x2ce0 net/tipc/socket.c:1357
 tipc_sendmsg+0x51/0x70 net/tipc/socket.c:1290
 sock_sendmsg_nosec net/socket.c:638 [inline]
 sock_sendmsg net/socket.c:658 [inline]
 kernel_sendmsg+0xe2/0x120 net/socket.c:678
 sock_no_sendpage+0x13f/0x1b0 net/core/sock.c:2768
 kernel_sendpage net/socket.c:3764 [inline]
 sock_sendpage+0xd0/0x120 net/socket.c:936
 pipe_to_sendpage+0x23b/0x300 fs/splice.c:449
 splice_from_pipe_feed fs/splice.c:500 [inline]
 __splice_from_pipe+0x2d3/0x870 fs/splice.c:624
 splice_from_pipe fs/splice.c:659 [inline]
 generic_splice_sendpage+0x172/0x200 fs/splice.c:829
 splice_direct_to_actor+0x496/0xb00 fs/splice.c:976
 do_splice_direct+0x279/0x3d0 fs/splice.c:1064
 do_sendfile+0x89d/0x1110 fs/read_write.c:1464
 __do_sys_sendfile64 fs/read_write.c:1525 [inline]
 __se_sys_sendfile64 fs/read_write.c:1511 [inline]
 __x64_sys_sendfile64+0x1ae/0x220 fs/read_write.c:1511
 do_syscall_64+0xcb/0x150 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x4443b9
Code: 43 02 00 85 c0 b8 00 00 00 00 48 0f 44 c3 5b c3 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 6b 0b fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fffd8f83588 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00000000004443b9
RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000004
RBP: 00007fffd8f835f0 R08: 0000000000000002 R09: 0000000600003034
R10: 0000000000200fc0 R11: 0000000000000246 R12: ffffffffffffffff
R13: 0000000000000006 R14: 0000000000000000 R15: 0000000000000000

Allocated by task 344:
 save_stack mm/kasan/common.c:69 [inline]
 set_track mm/kasan/common.c:77 [inline]
 __kasan_kmalloc+0x117/0x1b0 mm/kasan/common.c:510
 slab_post_alloc_hook mm/slab.h:584 [inline]
 slab_alloc_node mm/slub.c:2793 [inline]
 slab_alloc mm/slub.c:2801 [inline]
 kmem_cache_alloc+0x1d5/0x250 mm/slub.c:2806
 kmem_cache_alloc_node include/linux/slab.h:427 [inline]
 __alloc_skb+0x88/0x4d0 net/core/skbuff.c:198
 alloc_skb_fclone include/linux/skbuff.h:1107 [inline]
 tipc_buf_acquire net/tipc/msg.c:66 [inline]
 tipc_msg_build+0x727/0x1a60 net/tipc/msg.c:368
 tipc_sendmcast+0x92a/0xeb0 net/tipc/socket.c:813
 __tipc_sendmsg+0x120d/0x2ce0 net/tipc/socket.c:1357
 tipc_sendmsg+0x51/0x70 net/tipc/socket.c:1290
 sock_sendmsg_nosec net/socket.c:638 [inline]
 sock_sendmsg net/socket.c:658 [inline]
 kernel_sendmsg+0xe2/0x120 net/socket.c:678
 sock_no_sendpage+0x13f/0x1b0 net/core/sock.c:2768
 kernel_sendpage net/socket.c:3764 [inline]
 sock_sendpage+0xd0/0x120 net/socket.c:936
 pipe_to_sendpage+0x23b/0x300 fs/splice.c:449
 splice_from_pipe_feed fs/splice.c:500 [inline]
 __splice_from_pipe+0x2d3/0x870 fs/splice.c:624
 splice_from_pipe fs/splice.c:659 [inline]
 generic_splice_sendpage+0x172/0x200 fs/splice.c:829
 splice_direct_to_actor+0x496/0xb00 fs/splice.c:976
 do_splice_direct+0x279/0x3d0 fs/splice.c:1064
 do_sendfile+0x89d/0x1110 fs/read_write.c:1464
 __do_sys_sendfile64 fs/read_write.c:1525 [inline]
 __se_sys_sendfile64 fs/read_write.c:1511 [inline]
 __x64_sys_sendfile64+0x1ae/0x220 fs/read_write.c:1511
 do_syscall_64+0xcb/0x150 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Freed by task 344:
 save_stack mm/kasan/common.c:69 [inline]
 set_track mm/kasan/common.c:77 [inline]
 kasan_set_free_info mm/kasan/common.c:332 [inline]
 __kasan_slab_free+0x168/0x220 mm/kasan/common.c:471
 slab_free_hook mm/slub.c:1443 [inline]
 slab_free_freelist_hook+0xd0/0x150 mm/slub.c:1476
 slab_free mm/slub.c:3041 [inline]
 kmem_cache_free+0xac/0x5c0 mm/slub.c:3057
 tipc_buf_append+0x2d1/0xad0 net/tipc/msg.c:188
 tipc_msg_reassemble+0x331/0x590 net/tipc/msg.c:726
 tipc_mcast_xmit+0x223/0x1690 net/tipc/bcast.c:385
 tipc_sendmcast+0xc00/0xeb0 net/tipc/socket.c:819
 __tipc_sendmsg+0x120d/0x2ce0 net/tipc/socket.c:1357
 tipc_sendmsg+0x51/0x70 net/tipc/socket.c:1290
 sock_sendmsg_nosec net/socket.c:638 [inline]
 sock_sendmsg net/socket.c:658 [inline]
 kernel_sendmsg+0xe2/0x120 net/socket.c:678
 sock_no_sendpage+0x13f/0x1b0 net/core/sock.c:2768
 kernel_sendpage net/socket.c:3764 [inline]
 sock_sendpage+0xd0/0x120 net/socket.c:936
 pipe_to_sendpage+0x23b/0x300 fs/splice.c:449
 splice_from_pipe_feed fs/splice.c:500 [inline]
 __splice_from_pipe+0x2d3/0x870 fs/splice.c:624
 splice_from_pipe fs/splice.c:659 [inline]
 generic_splice_sendpage+0x172/0x200 fs/splice.c:829
 splice_direct_to_actor+0x496/0xb00 fs/splice.c:976
 do_splice_direct+0x279/0x3d0 fs/splice.c:1064
 do_sendfile+0x89d/0x1110 fs/read_write.c:1464
 __do_sys_sendfile64 fs/read_write.c:1525 [inline]
 __se_sys_sendfile64 fs/read_write.c:1511 [inline]
 __x64_sys_sendfile64+0x1ae/0x220 fs/read_write.c:1511
 do_syscall_64+0xcb/0x150 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

The buggy address belongs to the object at ffff8881c3085b80
 which belongs to the cache skbuff_fclone_cache of size 488
The buggy address is located 0 bytes inside of
 488-byte region [ffff8881c3085b80, ffff8881c3085d68)
The buggy address belongs to the page:
page:ffffea00070c2100 refcount:1 mapcount:0 mapping:ffff8881daa93680 index:0x0 compound_mapcount: 0
flags: 0x8000000000010200(slab|head)
raw: 8000000000010200 dead000000000100 dead000000000122 ffff8881daa93680
raw: 0000000000000000 00000000800c000c 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8881c3085a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc
 ffff8881c3085b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8881c3085b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                   ^
 ffff8881c3085c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff8881c3085c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
CPU: 0 PID: 344 Comm: syz-executor863 Tainted: G    B             5.4.68-syzkaller-00471-g6fa60aa03b21 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__write_once_size include/linux/compiler.h:226 [inline]
RIP: 0010:__skb_unlink include/linux/skbuff.h:2034 [inline]
RIP: 0010:__skb_dequeue include/linux/skbuff.h:2050 [inline]
RIP: 0010:__skb_queue_purge include/linux/skbuff.h:2761 [inline]
RIP: 0010:tipc_mcast_xmit+0x1061/0x1690 net/tipc/bcast.c:421
Code: af fd 4d 8b 67 08 4d 8d 6e 08 ba 10 00 00 00 4c 89 ff 31 f6 e8 f0 e6 ae fd 4c 89 e8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <80> 3c 08 00 74 08 4c 89 ef e8 a1 11 af fd 4d 89 66 08 4c 89 e0 48
RSP: 0018:ffff8881cddfef00 EFLAGS: 00010202
RAX: 0000000000000001 RBX: ffff8881cddff180 RCX: dffffc0000000000
RDX: 0000000000000010 RSI: 0000000000000000 RDI: ffff8881caeac210
RBP: ffff8881cddff0d0 R08: dffffc0000000000 R09: ffff8881caeac200
R10: ffffed10395d5842 R11: 00000000000000fb R12: ffff8881cddff180
R13: 0000000000000008 R14: 0000000000000000 R15: ffff8881caeac200
FS:  000000000199b940(0000) GS:ffff8881db800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f20e8039028 CR3: 00000001d1404002 CR4: 00000000001606f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 tipc_sendmcast+0xc00/0xeb0 net/tipc/socket.c:819
 __tipc_sendmsg+0x120d/0x2ce0 net/tipc/socket.c:1357
 tipc_sendmsg+0x51/0x70 net/tipc/socket.c:1290
 sock_sendmsg_nosec net/socket.c:638 [inline]
 sock_sendmsg net/socket.c:658 [inline]
 kernel_sendmsg+0xe2/0x120 net/socket.c:678
 sock_no_sendpage+0x13f/0x1b0 net/core/sock.c:2768
 kernel_sendpage net/socket.c:3764 [inline]
 sock_sendpage+0xd0/0x120 net/socket.c:936
 pipe_to_sendpage+0x23b/0x300 fs/splice.c:449
 splice_from_pipe_feed fs/splice.c:500 [inline]
 __splice_from_pipe+0x2d3/0x870 fs/splice.c:624
 splice_from_pipe fs/splice.c:659 [inline]
 generic_splice_sendpage+0x172/0x200 fs/splice.c:829
 splice_direct_to_actor+0x496/0xb00 fs/splice.c:976
 do_splice_direct+0x279/0x3d0 fs/splice.c:1064
 do_sendfile+0x89d/0x1110 fs/read_write.c:1464
 __do_sys_sendfile64 fs/read_write.c:1525 [inline]
 __se_sys_sendfile64 fs/read_write.c:1511 [inline]
 __x64_sys_sendfile64+0x1ae/0x220 fs/read_write.c:1511
 do_syscall_64+0xcb/0x150 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x4443b9
Code: 43 02 00 85 c0 b8 00 00 00 00 48 0f 44 c3 5b c3 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 6b 0b fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007fffd8f83588 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00000000004443b9
RDX: 0000000000000000 RSI: 0000000000000005 RDI: 0000000000000004
RBP: 00007fffd8f835f0 R08: 0000000000000002 R09: 0000000600003034
R10: 0000000000200fc0 R11: 0000000000000246 R12: ffffffffffffffff
R13: 0000000000000006 R14: 0000000000000000 R15: 0000000000000000
Modules linked in:
RSP: 0018:ffff8881cddfef00 EFLAGS: 00010202
RAX: 0000000000000001 RBX: ffff8881cddff180 RCX: dffffc0000000000
RDX: 0000000000000010 RSI: 0000000000000000 RDI: ffff8881caeac210
RBP: ffff8881cddff0d0 R08: dffffc0000000000 R09: ffff8881caeac200
R10: ffffed10395d5842 R11: 00000000000000fb R12: ffff8881cddff180
R13: 0000000000000008 R14: 0000000000000000 R15: ffff8881caeac200
FS:  000000000199b940(0000) GS:ffff8881db800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f20e8039028 CR3: 00000001d1404002 CR4: 00000000001606f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (23):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/09/29 18:39 android12-5.4 6fa60aa03b21 5abc3f1a .config console log report syz C ci2-android-5-4-kasan
2020/10/20 05:12 android12-5.4 b34934d40c49 ff4a3345 .config console log report info ci2-android-5-4-kasan
2020/10/20 03:36 android12-5.4 b34934d40c49 ff4a3345 .config console log report info ci2-android-5-4-kasan
2020/10/18 23:54 android12-5.4 b34934d40c49 fea47c01 .config console log report info ci2-android-5-4-kasan
2020/10/18 12:39 android12-5.4 b34934d40c49 fea47c01 .config console log report info ci2-android-5-4-kasan
2020/10/16 12:18 android12-5.4 0dd22903aee4 6e262c73 .config console log report info ci2-android-5-4-kasan
2020/10/16 10:44 android12-5.4 0dd22903aee4 6e262c73 .config console log report info ci2-android-5-4-kasan
2020/10/14 18:19 android12-5.4 206b4c285dac fc7735a2 .config console log report info ci2-android-5-4-kasan
2020/10/14 12:54 android12-5.4 2a31fdaad927 fc7735a2 .config console log report info ci2-android-5-4-kasan
2020/10/14 06:39 android12-5.4 2a31fdaad927 fc7735a2 .config console log report info ci2-android-5-4-kasan
2020/10/11 16:53 android12-5.4 d0e6eb879517 4a77ae0b .config console log report info ci2-android-5-4-kasan
2020/10/09 21:59 android12-5.4 d0e6eb879517 93817d89 .config console log report info ci2-android-5-4-kasan
2020/10/09 04:27 android12-5.4 b6216d9627f4 92390980 .config console log report info ci2-android-5-4-kasan
2020/10/07 15:26 android12-5.4 489646b879ed 1880b4a9 .config console log report info ci2-android-5-4-kasan
2020/10/07 08:50 android12-5.4 489646b879ed 1880b4a9 .config console log report info ci2-android-5-4-kasan
2020/10/06 02:53 android12-5.4 9d0d630081ae 1880b4a9 .config console log report info ci2-android-5-4-kasan
2020/10/04 22:04 android12-5.4 9d0d630081ae 5ef9c291 .config console log report info ci2-android-5-4-kasan
2020/10/04 19:58 android12-5.4 9d0d630081ae 5ef9c291 .config console log report info ci2-android-5-4-kasan
2020/10/03 03:04 android12-5.4 673e6740f870 062c9832 .config console log report info ci2-android-5-4-kasan
2020/10/03 02:07 android12-5.4 673e6740f870 062c9832 .config console log report info ci2-android-5-4-kasan
2020/10/02 15:36 android12-5.4 673e6740f870 062c9832 .config console log report info ci2-android-5-4-kasan
2020/10/01 16:32 android12-5.4 2a7d52383a14 4103fce0 .config console log report info ci2-android-5-4-kasan
2020/09/29 18:19 android12-5.4 6fa60aa03b21 5abc3f1a .config console log report info ci2-android-5-4-kasan
* Struck through repros no longer work on HEAD.