From: syzbot <syzbot+707d98c8649695eaf329@syzkaller.appspotmail.com>
To: aha310510@gmail.com, linux-kernel@vger.kernel.org,
syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [bpf?] [net?] KASAN: slab-use-after-free Read in bq_xmit_all
Date: Sun, 21 Jul 2024 10:29:03 -0700 [thread overview]
Message-ID: <000000000000d3a01d061dc54329@google.com> (raw)
In-Reply-To: <20240721163635.2486-1-aha310510@gmail.com>
Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
general protection fault in bq_flush_to_queue
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN PTI
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 1 PID: 6059 Comm: syz.0.51 Not tainted 6.10.0-rc6-syzkaller-01399-g605c96997d89 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
RIP: 0010:bq_flush_to_queue+0x44/0x610 kernel/bpf/cpumap.c:675
Code: df e8 50 dc d6 ff 49 8d 5e 50 48 89 d8 48 c1 e8 03 42 80 3c 38 00 74 08 48 89 df e8 a6 b1 39 00 48 8b 2b 48 89 e8 48 c1 e8 03 <42> 0f b6 04 38 84 c0 0f 85 1d 05 00 00 44 8b 65 00 4d 8d 6e 58 4c
RSP: 0018:ffffc90000a18a80 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff8880652a4290 RCX: ffff888073870000
RDX: 0000000080000101 RSI: 0000000000000010 RDI: ffff8880652a4240
RBP: 0000000000000000 R08: ffffffff895a503a R09: 1ffffffff1f5969d
R10: dffffc0000000000 R11: fffffbfff1f5969e R12: 0000000000000002
R13: ffffc900037d7820 R14: ffff8880652a4240 R15: dffffc0000000000
FS: 0000000000000000(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b33b5ffff CR3: 000000000e132000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<IRQ>
__cpu_map_flush+0x5d/0xd0 kernel/bpf/cpumap.c:767
xdp_do_check_flushed+0x136/0x240 net/core/filter.c:4304
__napi_poll+0xe4/0x490 net/core/dev.c:6774
napi_poll net/core/dev.c:6840 [inline]
net_rx_action+0x89b/0x1240 net/core/dev.c:6962
handle_softirqs+0x2c4/0x970 kernel/softirq.c:554
__do_softirq kernel/softirq.c:588 [inline]
invoke_softirq kernel/softirq.c:428 [inline]
__irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637
irq_exit_rcu+0x9/0x30 kernel/softirq.c:649
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1043
</IRQ>
<TASK>
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
RIP: 0010:_raw_spin_unlock_irqrestore+0xd8/0x140 kernel/locking/spinlock.c:194
Code: 9c 8f 44 24 20 42 80 3c 23 00 74 08 4c 89 f7 e8 1e d9 6c f6 f6 44 24 21 02 75 52 41 f7 c7 00 02 00 00 74 01 fb bf 01 00 00 00 <e8> e3 79 d9 f5 65 8b 05 34 b3 77 74 85 c0 74 43 48 c7 04 24 0e 36
RSP: 0018:ffffc900037d7580 EFLAGS: 00000206
RAX: 35c09d964b24e400 RBX: 1ffff920006faeb4 RCX: ffffffff8172d8aa
RDX: dffffc0000000000 RSI: ffffffff8bcabb40 RDI: 0000000000000001
RBP: ffffc900037d7610 R08: ffffffff92f875b7 R09: 1ffffffff25f0eb6
R10: dffffc0000000000 R11: fffffbfff25f0eb7 R12: dffffc0000000000
R13: 1ffff920006faeb0 R14: ffffc900037d75a0 R15: 0000000000000246
__debug_check_no_obj_freed lib/debugobjects.c:998 [inline]
debug_check_no_obj_freed+0x561/0x580 lib/debugobjects.c:1019
slab_free_hook mm/slub.c:2163 [inline]
slab_free mm/slub.c:4438 [inline]
kmem_cache_free+0x10f/0x350 mm/slub.c:4513
vma_lock_free kernel/fork.c:453 [inline]
__vm_area_free+0xe0/0x110 kernel/fork.c:509
remove_vma mm/mmap.c:146 [inline]
exit_mmap+0x645/0xc80 mm/mmap.c:3365
__mmput+0x115/0x3c0 kernel/fork.c:1346
exit_mm+0x220/0x310 kernel/exit.c:567
do_exit+0x9aa/0x27e0 kernel/exit.c:863
do_group_exit+0x207/0x2c0 kernel/exit.c:1025
get_signal+0x16a1/0x1740 kernel/signal.c:2909
arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:310
exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
__syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
syscall_exit_to_user_mode+0xc9/0x360 kernel/entry/common.c:218
do_syscall_64+0x100/0x230 arch/x86/entry/common.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f1530b75b59
Code: Unable to access opcode bytes at 0x7f1530b75b2f.
RSP: 002b:00007f153197b0f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 00007f1530d05f68 RCX: 00007f1530b75b59
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f1530d05f68
RBP: 00007f1530d05f60 R08: 00007f153197b6c0 R09: 00007f153197b6c0
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f1530d05f6c
R13: 000000000000000b R14: 00007ffd94c0c0d0 R15: 00007ffd94c0c1b8
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:bq_flush_to_queue+0x44/0x610 kernel/bpf/cpumap.c:675
Code: df e8 50 dc d6 ff 49 8d 5e 50 48 89 d8 48 c1 e8 03 42 80 3c 38 00 74 08 48 89 df e8 a6 b1 39 00 48 8b 2b 48 89 e8 48 c1 e8 03 <42> 0f b6 04 38 84 c0 0f 85 1d 05 00 00 44 8b 65 00 4d 8d 6e 58 4c
RSP: 0018:ffffc90000a18a80 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff8880652a4290 RCX: ffff888073870000
RDX: 0000000080000101 RSI: 0000000000000010 RDI: ffff8880652a4240
RBP: 0000000000000000 R08: ffffffff895a503a R09: 1ffffffff1f5969d
R10: dffffc0000000000 R11: fffffbfff1f5969e R12: 0000000000000002
R13: ffffc900037d7820 R14: ffff8880652a4240 R15: dffffc0000000000
FS: 0000000000000000(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b33b5ffff CR3: 000000000e132000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess), 1 bytes skipped:
0: e8 50 dc d6 ff call 0xffd6dc55
5: 49 8d 5e 50 lea 0x50(%r14),%rbx
9: 48 89 d8 mov %rbx,%rax
c: 48 c1 e8 03 shr $0x3,%rax
10: 42 80 3c 38 00 cmpb $0x0,(%rax,%r15,1)
15: 74 08 je 0x1f
17: 48 89 df mov %rbx,%rdi
1a: e8 a6 b1 39 00 call 0x39b1c5
1f: 48 8b 2b mov (%rbx),%rbp
22: 48 89 e8 mov %rbp,%rax
25: 48 c1 e8 03 shr $0x3,%rax
* 29: 42 0f b6 04 38 movzbl (%rax,%r15,1),%eax <-- trapping instruction
2e: 84 c0 test %al,%al
30: 0f 85 1d 05 00 00 jne 0x553
36: 44 8b 65 00 mov 0x0(%rbp),%r12d
3a: 4d 8d 6e 58 lea 0x58(%r14),%r13
3e: 4c rex.WR
Tested on:
commit: 605c9699 bpf: relax zero fixed offset constraint on KF..
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=146d0ae6980000
kernel config: https://syzkaller.appspot.com/x/.config?x=8defeae77515c9b1
dashboard link: https://syzkaller.appspot.com/bug?extid=707d98c8649695eaf329
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
Note: no patches were applied.
next parent reply other threads:[~2024-07-21 17:29 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240721163635.2486-1-aha310510@gmail.com>
2024-07-21 17:29 ` syzbot [this message]
[not found] <20240722094810.4193-1-aha310510@gmail.com>
2024-07-22 14:19 ` [syzbot] [bpf?] [net?] KASAN: slab-use-after-free Read in bq_xmit_all syzbot
[not found] <20240722094420.4136-1-aha310510@gmail.com>
2024-07-22 13:57 ` syzbot
[not found] <20240722094345.4089-1-aha310510@gmail.com>
2024-07-22 13:51 ` syzbot
[not found] <20240722094330.4024-1-aha310510@gmail.com>
2024-07-22 11:15 ` syzbot
[not found] <20240721163824.2543-1-aha310510@gmail.com>
2024-07-21 17:53 ` syzbot
[not found] <20240721163522.2416-1-aha310510@gmail.com>
2024-07-21 17:11 ` syzbot
[not found] <20240721154738.269841-1-aha310510@gmail.com>
2024-07-21 16:10 ` syzbot
[not found] <20240721151344.269717-1-aha310510@gmail.com>
2024-07-21 16:09 ` syzbot
[not found] <20240721150446.269633-1-aha310510@gmail.com>
2024-07-21 15:45 ` syzbot
[not found] <20240721144408.268936-1-aha310510@gmail.com>
2024-07-21 15:18 ` syzbot
[not found] <20240721132859.268170-1-aha310510@gmail.com>
2024-07-21 13:59 ` syzbot
[not found] <20240721131603.267262-1-aha310510@gmail.com>
2024-07-21 13:41 ` syzbot
[not found] <20240721113702.235104-1-aha310510@gmail.com>
2024-07-21 12:02 ` syzbot
[not found] <20240721104511.234568-1-aha310510@gmail.com>
2024-07-21 11:22 ` syzbot
[not found] <20240721085206.230835-1-aha310510@gmail.com>
2024-07-21 9:26 ` syzbot
[not found] <20240721032833.168011-1-aha310510@gmail.com>
2024-07-21 4:48 ` syzbot
2024-07-19 5:12 syzbot
2024-07-19 8:11 ` Jesper Dangaard Brouer
2024-07-20 9:15 ` 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=000000000000d3a01d061dc54329@google.com \
--to=syzbot+707d98c8649695eaf329@syzkaller.appspotmail.com \
--cc=aha310510@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.