[syzbot] WARNING in tls_strp_done

13 views
Skip to first unread message

syzbot

unread,
Aug 14, 2022, 6:15:24 AM8/14/22
to bor...@nvidia.com, da...@davemloft.net, edum...@google.com, john.fa...@gmail.com, ku...@kernel.org, linux-...@vger.kernel.org, net...@vger.kernel.org, pab...@redhat.com, syzkall...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 7ebfc85e2cd7 Merge tag 'net-6.0-rc1' of git://git.kernel.o..
git tree: upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=10545c6b080000
kernel config: https://syzkaller.appspot.com/x/.config?x=924833c12349a8c0
dashboard link: https://syzkaller.appspot.com/bug?extid=abd45eb849b05194b1b6
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=164c98cb080000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15497dc3080000

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

------------[ cut here ]------------
WARNING: CPU: 0 PID: 3611 at kernel/workqueue.c:3066 __flush_work+0x926/0xb10 kernel/workqueue.c:3066
Modules linked in:
CPU: 0 PID: 3611 Comm: syz-executor165 Not tainted 5.19.0-syzkaller-13930-g7ebfc85e2cd7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022
RIP: 0010:__flush_work+0x926/0xb10 kernel/workqueue.c:3066
Code: 00 48 c7 c6 0b 12 4f 81 48 c7 c7 40 92 f8 8b e8 30 61 10 00 e9 66 fc ff ff e8 d6 f4 2c 00 0f 0b e9 5a fc ff ff e8 ca f4 2c 00 <0f> 0b 45 31 f6 e9 4b fc ff ff e8 0b 4c 79 00 e9 3a fb ff ff e8 b1
RSP: 0018:ffffc900038bf948 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffff888020f0a8f0 RCX: 0000000000000000
RDX: ffff88801bd50000 RSI: ffffffff814f1246 RDI: 0000000000000001
RBP: ffffc900038bfae0 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000000 R12: dffffc0000000000
R13: 1ffff92000717f5f R14: 0000000000000001 R15: ffff888020f0a908
FS: 0000000000000000(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005555559cb5d0 CR3: 000000000bc8e000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
__cancel_work_timer+0x3f9/0x570 kernel/workqueue.c:3162
tls_strp_done+0x66/0x230 net/tls/tls_strp.c:478
tls_sk_proto_close+0x40d/0xaf0 net/tls/tls_main.c:328
inet_release+0x12e/0x270 net/ipv4/af_inet.c:428
inet6_release+0x4c/0x70 net/ipv6/af_inet6.c:482
__sock_release+0xcd/0x280 net/socket.c:650
sock_close+0x18/0x20 net/socket.c:1365
__fput+0x277/0x9d0 fs/file_table.c:320
task_work_run+0xdd/0x1a0 kernel/task_work.c:177
exit_task_work include/linux/task_work.h:38 [inline]
do_exit+0xad5/0x29b0 kernel/exit.c:795
do_group_exit+0xd2/0x2f0 kernel/exit.c:925
__do_sys_exit_group kernel/exit.c:936 [inline]
__se_sys_exit_group kernel/exit.c:934 [inline]
__x64_sys_exit_group+0x3a/0x50 kernel/exit.c:934
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f0b52a2fdf9
Code: Unable to access opcode bytes at RIP 0x7f0b52a2fdcf.
RSP: 002b:00007fffd86d4c68 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 00007f0b52aa43f0 RCX: 00007f0b52a2fdf9
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffffffffffc0 R09: 0000000000000001
R10: 00000000200004c0 R11: 0000000000000246 R12: 00007f0b52aa43f0
R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000001
</TASK>


---
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 can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches

Hillf Danton

unread,
Aug 14, 2022, 8:45:38 AM8/14/22
to syzbot, linux-...@vger.kernel.org, syzkall...@googlegroups.com
On Sun, 14 Aug 2022 03:15:24 -0700
> syzbot found the following issue on:
>
> HEAD commit: 7ebfc85e2cd7 Merge tag 'net-6.0-rc1' of git://git.kernel.o..
> git tree: upstream
> console+strace: https://syzkaller.appspot.com/x/log.txt?x=10545c6b080000
> kernel config: https://syzkaller.appspot.com/x/.config?x=924833c12349a8c0
> dashboard link: https://syzkaller.appspot.com/bug?extid=abd45eb849b05194b1b6
> compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=164c98cb080000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15497dc3080000

See if parser is initialized before teardown.

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 7ebfc85e2cd7

--- a/net/tls/tls_strp.c
+++ t/net/tls/tls_strp.c
@@ -474,6 +474,8 @@ int tls_strp_init(struct tls_strparser *
void tls_strp_done(struct tls_strparser *strp)
{
WARN_ON(!strp->stopped);
+ if (!strp->anchor)
+ return;

cancel_work_sync(&strp->work);
tls_strp_anchor_free(strp);
--

syzbot

unread,
Aug 14, 2022, 10:44:23 AM8/14/22
to hda...@sina.com, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-and-tested-by: syzbot+abd45e...@syzkaller.appspotmail.com

Tested on:

commit: 7ebfc85e Merge tag 'net-6.0-rc1' of git://git.kernel.o..
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=131b1a0d080000
kernel config: https://syzkaller.appspot.com/x/.config?x=924833c12349a8c0
dashboard link: https://syzkaller.appspot.com/bug?extid=abd45eb849b05194b1b6
compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2
patch: https://syzkaller.appspot.com/x/patch.diff?x=103a3e2d080000

Note: testing is done by a robot and is best-effort only.
Reply all
Reply to author
Forward
0 new messages