[moderation] [bpf?] general protection fault in drain_mem_cache

0 views
Skip to first unread message

syzbot

unread,
May 25, 2024, 7:48:24 AMMay 25
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 8f6a15f095a6 Merge tag 'cocci-for-6.10' of git://git.kerne..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1414f392980000
kernel config: https://syzkaller.appspot.com/x/.config?x=cec8dc951d3cca13
dashboard link: https://syzkaller.appspot.com/bug?extid=1545ca5c4f925cfda99e
compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: i386
CC: [and...@kernel.org a...@kernel.org b...@vger.kernel.org dan...@iogearbox.net edd...@gmail.com hao...@google.com john.fa...@gmail.com jo...@kernel.org kps...@kernel.org linux-...@vger.kernel.org marti...@linux.dev s...@google.com so...@kernel.org yongho...@linux.dev]

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/7bc7510fe41f/non_bootable_disk-8f6a15f0.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/e76220459de3/vmlinux-8f6a15f0.xz
kernel image: https://storage.googleapis.com/syzbot-assets/584cb4587029/bzImage-8f6a15f0.xz

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

Oops: general protection fault, probably for non-canonical address 0xdffffc0000000005: 0000 [#1] PREEMPT SMP KASAN NOPTI
KASAN: null-ptr-deref in range [0x0000000000000028-0x000000000000002f]
CPU: 1 PID: 45 Comm: kworker/u32:2 Not tainted 6.9.0-syzkaller-10323-g8f6a15f095a6 #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Workqueue: events_unbound bpf_map_free_deferred
RIP: 0010:free_all kernel/bpf/memalloc.c:272 [inline]
RIP: 0010:drain_mem_cache+0x433/0x610 kernel/bpf/memalloc.c:647
Code: 75 1c eb 78 e8 8e ba da ff 48 89 ef e8 e6 9f 2d 00 e8 81 ba da ff 4d 85 ed 74 61 4c 89 ed e8 74 ba da ff 48 89 e8 48 c1 e8 03 <42> 80 3c 30 00 0f 85 08 01 00 00 31 ff 89 de 4c 8b 6d 00 e8 55 b5
RSP: 0018:ffffc900006bfb58 EFLAGS: 00010207
RAX: 0000000000000005 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff888018cfa440 RSI: ffffffff81b3ca2c RDI: ffffe8ffad3590f0
RBP: 000000000000002d R08: 0000000000000000 R09: ffffed10058289a0
R10: ffff88802c144d03 R11: 0000000000000002 R12: ffffe8ffad359050
R13: 0000000000000000 R14: dffffc0000000000 R15: ffffe8ffad2590e8
FS: 0000000000000000(0000) GS:ffff88802c100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000c000e718e8 CR3: 000000002b91c000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
bpf_mem_alloc_destroy+0x14b/0x9d0 kernel/bpf/memalloc.c:758
htab_map_free+0x38c/0xb40 kernel/bpf/hashtab.c:1564
bpf_map_free_deferred+0x1ce/0x420 kernel/bpf/syscall.c:746
process_one_work+0x958/0x1ad0 kernel/workqueue.c:3231
process_scheduled_works kernel/workqueue.c:3312 [inline]
worker_thread+0x6c8/0xf70 kernel/workqueue.c:3393
kthread+0x2c1/0x3a0 kernel/kthread.c:389
ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:free_all kernel/bpf/memalloc.c:272 [inline]
RIP: 0010:drain_mem_cache+0x433/0x610 kernel/bpf/memalloc.c:647
Code: 75 1c eb 78 e8 8e ba da ff 48 89 ef e8 e6 9f 2d 00 e8 81 ba da ff 4d 85 ed 74 61 4c 89 ed e8 74 ba da ff 48 89 e8 48 c1 e8 03 <42> 80 3c 30 00 0f 85 08 01 00 00 31 ff 89 de 4c 8b 6d 00 e8 55 b5
RSP: 0018:ffffc900006bfb58 EFLAGS: 00010207
RAX: 0000000000000005 RBX: 0000000000000000 RCX: 0000000000000000
RDX: ffff888018cfa440 RSI: ffffffff81b3ca2c RDI: ffffe8ffad3590f0
RBP: 000000000000002d R08: 0000000000000000 R09: ffffed10058289a0
R10: ffff88802c144d03 R11: 0000000000000002 R12: ffffe8ffad359050
R13: 0000000000000000 R14: dffffc0000000000 R15: ffffe8ffad2590e8
FS: 0000000000000000(0000) GS:ffff88802c000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000f7f14ea0 CR3: 0000000026748000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 75 1c jne 0x1e
2: eb 78 jmp 0x7c
4: e8 8e ba da ff call 0xffdaba97
9: 48 89 ef mov %rbp,%rdi
c: e8 e6 9f 2d 00 call 0x2d9ff7
11: e8 81 ba da ff call 0xffdaba97
16: 4d 85 ed test %r13,%r13
19: 74 61 je 0x7c
1b: 4c 89 ed mov %r13,%rbp
1e: e8 74 ba da ff call 0xffdaba97
23: 48 89 e8 mov %rbp,%rax
26: 48 c1 e8 03 shr $0x3,%rax
* 2a: 42 80 3c 30 00 cmpb $0x0,(%rax,%r14,1) <-- trapping instruction
2f: 0f 85 08 01 00 00 jne 0x13d
35: 31 ff xor %edi,%edi
37: 89 de mov %ebx,%esi
39: 4c 8b 6d 00 mov 0x0(%rbp),%r13
3d: e8 .byte 0xe8
3e: 55 push %rbp
3f: b5 .byte 0xb5


---
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.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages