[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CALAgD-6Pk4D9J3KHRts-g_6Zj1iphuWXfBhYzOn+wF7BrcbyAg@mail.gmail.com>
Date: Sat, 24 Aug 2024 21:03:11 -0700
From: Xingyu Li <xli399@....edu>
To: akpm@...ux-foundation.org, linux-kernel@...r.kernel.org
Subject: general protection fault in __kernfs_remove
Hi,
We found a bug in Linux 6.10 using syzkaller. It is a null pointer
dereference bug.
We show the bug report as below. Unfortunately, there is no syzkaller
reproducer for it.
bug report:
veth0_vlan: left promiscuous mode
team0 (unregistering): Port device team_slave_1 removed
team0 (unregistering): Port device team_slave_0 removed
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: 0 PID: 923 Comm: kworker/u4:5 Not tainted 6.10.0 #13
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
Workqueue: netns cleanup_net
RIP: 0010:____rb_erase_color lib/rbtree.c:354 [inline]
RIP: 0010:rb_erase+0x5c8/0xe80 lib/rbtree.c:445
Code: 00 49 8d 5f 10 48 89 d8 48 c1 e8 03 48 89 44 24 10 42 80 3c 28
00 74 08 48 89 df e8 02 56 03 f7 4c 8b 23 4d 89 e6 49 c1 ee 03 <43> 80
3c 2e 00 74 08 4c 89 e7 e8 e9 55 03 f7 41 f6 04 24 01 48 89
RSP: 0018:ffffc90002f774d8 EFLAGS: 00010246
RAX: 1ffff11008ae8954 RBX: ffff888045744aa0 RCX: dffffc0000000000
RDX: 0000000000000001 RSI: ffff8880456beca0 RDI: ffff888045744138
RBP: ffff888045744a98 R08: ffff8880142d3177 R09: 1ffff1100285a62e
R10: dffffc0000000000 R11: ffffed100285a62f R12: 0000000000000000
R13: dffffc0000000000 R14: 0000000000000000 R15: ffff888045744a90
FS: 0000000000000000(0000) GS:ffff888063a00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffcb35aed90 CR3: 00000000417fa000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
kernfs_unlink_sibling fs/kernfs/dir.c:419 [inline]
__kernfs_remove+0x5eb/0x830 fs/kernfs/dir.c:1492
kernfs_remove_by_name_ns+0xd3/0x150 fs/kernfs/dir.c:1694
kernfs_remove_by_name include/linux/kernfs.h:625 [inline]
remove_files fs/sysfs/group.c:28 [inline]
sysfs_remove_group+0xfa/0x2c0 fs/sysfs/group.c:319
sysfs_remove_groups+0x50/0xa0 fs/sysfs/group.c:343
device_remove_groups drivers/base/core.c:2833 [inline]
device_remove_attrs+0x236/0x290 drivers/base/core.c:2969
device_del+0x512/0x940 drivers/base/core.c:3867
unregister_netdevice_many_notify+0x11a3/0x16d0 net/core/dev.c:11249
unregister_netdevice_many net/core/dev.c:11277 [inline]
default_device_exit_batch+0xa79/0xaf0 net/core/dev.c:11760
ops_exit_list net/core/net_namespace.c:178 [inline]
cleanup_net+0x8ae/0xcd0 net/core/net_namespace.c:640
process_one_work kernel/workqueue.c:3248 [inline]
process_scheduled_works+0x977/0x1410 kernel/workqueue.c:3329
worker_thread+0xaa0/0x1020 kernel/workqueue.c:3409
kthread+0x2eb/0x380 kernel/kthread.c:389
ret_from_fork+0x49/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:244
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:____rb_erase_color lib/rbtree.c:354 [inline]
RIP: 0010:rb_erase+0x5c8/0xe80 lib/rbtree.c:445
Code: 00 49 8d 5f 10 48 89 d8 48 c1 e8 03 48 89 44 24 10 42 80 3c 28
00 74 08 48 89 df e8 02 56 03 f7 4c 8b 23 4d 89 e6 49 c1 ee 03 <43> 80
3c 2e 00 74 08 4c 89 e7 e8 e9 55 03 f7 41 f6 04 24 01 48 89
RSP: 0018:ffffc90002f774d8 EFLAGS: 00010246
RAX: 1ffff11008ae8954 RBX: ffff888045744aa0 RCX: dffffc0000000000
RDX: 0000000000000001 RSI: ffff8880456beca0 RDI: ffff888045744138
RBP: ffff888045744a98 R08: ffff8880142d3177 R09: 1ffff1100285a62e
R10: dffffc0000000000 R11: ffffed100285a62f R12: 0000000000000000
R13: dffffc0000000000 R14: 0000000000000000 R15: ffff888045744a90
FS: 0000000000000000(0000) GS:ffff888063a00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f6f4aa4f048 CR3: 00000000197b6000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 00 49 8d add %cl,-0x73(%rcx)
3: 5f pop %rdi
4: 10 48 89 adc %cl,-0x77(%rax)
7: d8 48 c1 fmuls -0x3f(%rax)
a: e8 03 48 89 44 call 0x44894812
f: 24 10 and $0x10,%al
11: 42 80 3c 28 00 cmpb $0x0,(%rax,%r13,1)
16: 74 08 je 0x20
18: 48 89 df mov %rbx,%rdi
1b: e8 02 56 03 f7 call 0xf7035622
20: 4c 8b 23 mov (%rbx),%r12
23: 4d 89 e6 mov %r12,%r14
26: 49 c1 ee 03 shr $0x3,%r14
* 2a: 43 80 3c 2e 00 cmpb $0x0,(%r14,%r13,1) <-- trapping instruction
2f: 74 08 je 0x39
31: 4c 89 e7 mov %r12,%rdi
34: e8 e9 55 03 f7 call 0xf7035622
39: 41 f6 04 24 01 testb $0x1,(%r12)
3e: 48 rex.W
3f: 89 .byte 0x89
--
Yours sincerely,
Xingyu
Powered by blists - more mailing lists