public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+f3a31fb909db9b2a5c4d@syzkaller.appspotmail.com>
To: eadavis@qq.com, linux-kernel@vger.kernel.org,
	 syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [mptcp?] KASAN: slab-use-after-free Read in __timer_delete_sync
Date: Tue, 10 Sep 2024 00:43:02 -0700	[thread overview]
Message-ID: <000000000000f558c40621bf05a6@google.com> (raw)
In-Reply-To: <tencent_B068E96703AA4446F774176E66C1B3778305@qq.com>

Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
general protection fault in mptcp_pm_del_add_timer

Oops: general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] PREEMPT SMP KASAN PTI
KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f]
CPU: 0 UID: 0 PID: 6054 Comm: syz.1.16 Not tainted 6.11.0-rc7-syzkaller-gbc83b4d1f086-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
RIP: 0010:__list_del_entry_valid_or_report+0x23/0x140 lib/list_debug.c:49
Code: 90 90 90 90 90 90 90 f3 0f 1e fa 41 57 41 56 41 54 53 49 89 ff 49 bc 00 00 00 00 00 fc ff df 48 83 c7 08 48 89 f8 48 c1 e8 03 <42> 80 3c 20 00 74 05 e8 f1 a5 40 fd 49 8b 5f 08 4c 89 f8 48 c1 e8
RSP: 0018:ffffc900032172a0 EFLAGS: 00010202
RAX: 0000000000000001 RBX: ffff88801295ac90 RCX: 0000000000000001
RDX: dffffc0000000000 RSI: 0000000000000004 RDI: 0000000000000008
RBP: 0000000000000000 R08: 0000000000000003 R09: fffff52000642e48
R10: dffffc0000000000 R11: fffff52000642e48 R12: dffffc0000000000
R13: ffff888028988a48 R14: 0000000000000000 R15: 0000000000000000
FS:  00007fe27a4d56c0(0000) GS:ffff8880b8800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffdededd998 CR3: 000000006406c000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 __list_del_entry_valid include/linux/list.h:124 [inline]
 __list_del_entry include/linux/list.h:215 [inline]
 list_del include/linux/list.h:229 [inline]
 mptcp_pm_del_add_timer+0x173/0x2c0 net/mptcp/pm_netlink.c:353
 remove_anno_list_by_saddr net/mptcp/pm_netlink.c:1472 [inline]
 mptcp_pm_remove_addrs_and_subflows net/mptcp/pm_netlink.c:1689 [inline]
 mptcp_nl_remove_addrs_list net/mptcp/pm_netlink.c:1720 [inline]
 mptcp_pm_nl_flush_addrs_doit+0x670/0xdd0 net/mptcp/pm_netlink.c:1761
 genl_family_rcv_msg_doit net/netlink/genetlink.c:1115 [inline]
 genl_family_rcv_msg net/netlink/genetlink.c:1195 [inline]
 genl_rcv_msg+0xb14/0xec0 net/netlink/genetlink.c:1210
 netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2550
 genl_rcv+0x28/0x40 net/netlink/genetlink.c:1219
 netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline]
 netlink_unicast+0x7f6/0x990 net/netlink/af_netlink.c:1357
 netlink_sendmsg+0x8e4/0xcb0 net/netlink/af_netlink.c:1901
 sock_sendmsg_nosec net/socket.c:730 [inline]
 __sock_sendmsg+0x221/0x270 net/socket.c:745
 ____sys_sendmsg+0x525/0x7d0 net/socket.c:2597
 ___sys_sendmsg net/socket.c:2651 [inline]
 __sys_sendmsg+0x2b0/0x3a0 net/socket.c:2680
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fe279779eb9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fe27a4d5038 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007fe279915f80 RCX: 00007fe279779eb9
RDX: 0000000001000000 RSI: 0000000020000300 RDI: 0000000000000003
RBP: 00007fe2797e793e R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fe279915f80 R15: 00007fe279a3fa28
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__list_del_entry_valid_or_report+0x23/0x140 lib/list_debug.c:49
Code: 90 90 90 90 90 90 90 f3 0f 1e fa 41 57 41 56 41 54 53 49 89 ff 49 bc 00 00 00 00 00 fc ff df 48 83 c7 08 48 89 f8 48 c1 e8 03 <42> 80 3c 20 00 74 05 e8 f1 a5 40 fd 49 8b 5f 08 4c 89 f8 48 c1 e8
RSP: 0018:ffffc900032172a0 EFLAGS: 00010202
RAX: 0000000000000001 RBX: ffff88801295ac90 RCX: 0000000000000001
RDX: dffffc0000000000 RSI: 0000000000000004 RDI: 0000000000000008
RBP: 0000000000000000 R08: 0000000000000003 R09: fffff52000642e48
R10: dffffc0000000000 R11: fffff52000642e48 R12: dffffc0000000000
R13: ffff888028988a48 R14: 0000000000000000 R15: 0000000000000000
FS:  00007fe27a4d56c0(0000) GS:ffff8880b8800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffdededd998 CR3: 000000006406c000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
   0:	90                   	nop
   1:	90                   	nop
   2:	90                   	nop
   3:	90                   	nop
   4:	90                   	nop
   5:	90                   	nop
   6:	90                   	nop
   7:	f3 0f 1e fa          	endbr64
   b:	41 57                	push   %r15
   d:	41 56                	push   %r14
   f:	41 54                	push   %r12
  11:	53                   	push   %rbx
  12:	49 89 ff             	mov    %rdi,%r15
  15:	49 bc 00 00 00 00 00 	movabs $0xdffffc0000000000,%r12
  1c:	fc ff df
  1f:	48 83 c7 08          	add    $0x8,%rdi
  23:	48 89 f8             	mov    %rdi,%rax
  26:	48 c1 e8 03          	shr    $0x3,%rax
* 2a:	42 80 3c 20 00       	cmpb   $0x0,(%rax,%r12,1) <-- trapping instruction
  2f:	74 05                	je     0x36
  31:	e8 f1 a5 40 fd       	call   0xfd40a627
  36:	49 8b 5f 08          	mov    0x8(%r15),%rbx
  3a:	4c 89 f8             	mov    %r15,%rax
  3d:	48                   	rex.W
  3e:	c1                   	.byte 0xc1
  3f:	e8                   	.byte 0xe8


Tested on:

commit:         bc83b4d1 Merge tag 'bcachefs-2024-09-09' of git://evil..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1555a807980000
kernel config:  https://syzkaller.appspot.com/x/.config?x=61d235cb8d15001c
dashboard link: https://syzkaller.appspot.com/bug?extid=f3a31fb909db9b2a5c4d
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch:          https://syzkaller.appspot.com/x/patch.diff?x=16746797980000


  reply	other threads:[~2024-09-10  7:43 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-03 13:13 [syzbot] [mptcp?] KASAN: slab-use-after-free Read in __timer_delete_sync syzbot
2024-09-03 13:43 ` Edward Adam Davis
2024-09-03 14:09   ` syzbot
2024-09-03 13:52 ` Edward Adam Davis
2024-09-03 14:24   ` syzbot
2024-09-03 15:09 ` [PATCH] mptcp: pm: Fix uaf " Edward Adam Davis
2024-09-03 15:18   ` Eric Dumazet
2024-09-04  0:52     ` Edward Adam Davis
2024-09-04  1:01       ` [PATCH V2] " Edward Adam Davis
2024-09-04 20:39         ` Matthieu Baerts
2024-09-05 12:27           ` [PATCH net v3] " Edward Adam Davis
2024-09-06 18:55             ` Matthieu Baerts
2024-09-06 22:02               ` Jakub Kicinski
2024-09-09  7:01                 ` Matthieu Baerts
2024-09-09 13:07             ` Paolo Abeni
2024-09-10  3:59               ` Edward Adam Davis
2024-09-10  9:58                 ` [PATCH V4] " Edward Adam Davis
2024-09-10  9:58                 ` [PATCH net " Edward Adam Davis
2024-09-10 11:27                   ` Paolo Abeni
2024-09-10 14:29                   ` Matthieu Baerts
2024-09-11 23:20                   ` patchwork-bot+netdevbpf
2024-09-05 12:35           ` [PATCH V2] " Edward Adam Davis
2024-09-04  0:20 ` [syzbot] [mptcp?] KASAN: slab-use-after-free Read " Edward Adam Davis
2024-09-04  0:42   ` syzbot
2024-09-04 17:05 ` [PATCH net] mptcp: pm: Fix uaf " Matthieu Baerts (NGI0)
2024-09-05  0:46   ` [syzbot] [mptcp?] KASAN: slab-use-after-free Read " syzbot
2024-09-04 17:45 ` [PATCH net v2] mptcp: pm: Fix uaf " Matthieu Baerts (NGI0)
2024-09-05  1:10   ` [syzbot] [mptcp?] KASAN: slab-use-after-free Read " syzbot
2024-09-10  3:54 ` Edward Adam Davis
2024-09-10  6:56   ` syzbot
2024-09-10  7:10 ` Edward Adam Davis
2024-09-10  7:43   ` syzbot [this message]
2024-09-10  8:03 ` Edward Adam Davis
2024-09-10  8:32   ` syzbot
2024-09-10  9:32 ` Edward Adam Davis
2024-09-10  9:57   ` syzbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=000000000000f558c40621bf05a6@google.com \
    --to=syzbot+f3a31fb909db9b2a5c4d@syzkaller.appspotmail.com \
    --cc=eadavis@qq.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzkaller-bugs@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox