syzbot


general protection fault in kernfs_link_sibling

Status: auto-closed as invalid on 2021/10/02 22:42
Subsystems: kernfs
[Documentation on labels]
Reported-by: syzbot+710b2456afab869e08c4@syzkaller.appspotmail.com
First crash: 1026d, last: 1026d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream general protection fault in kernfs_link_sibling (2) kernfs 1 917d 913d 0/26 auto-closed as invalid on 2021/12/20 10:47
upstream general protection fault in kernfs_link_sibling (3) kernfs 5 442d 442d 0/26 auto-obsoleted due to no activity on 2023/04/09 15:59
upstream KASAN: use-after-free Read in kernfs_link_sibling kernfs 1 677d 673d 0/26 auto-obsoleted due to no activity on 2022/09/16 07:38

Sample crash report:
general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f]
CPU: 0 PID: 22335 Comm: kworker/u4:8 Tainted: G        W         5.13.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: netns cleanup_net
RIP: 0010:__rb_insert lib/rbtree.c:115 [inline]
RIP: 0010:rb_insert_color+0x6d/0x7a0 lib/rbtree.c:436
Code: 48 89 d8 48 c1 e8 03 42 80 3c 28 00 0f 85 48 05 00 00 48 8b 2b 40 f6 c5 01 0f 85 81 01 00 00 48 8d 7d 08 48 89 f8 48 c1 e8 03 <42> 80 3c 28 00 0f 85 01 05 00 00 4c 8b 75 08 49 39 de 0f 84 6d 01
RSP: 0018:ffffc90001c773f0 EFLAGS: 00010202
RAX: 0000000000000001 RBX: ffff88803e2e8698 RCX: 0000000000000000
RDX: 1ffff11007c5d099 RSI: ffff88809d327240 RDI: 0000000000000008
RBP: 0000000000000000 R08: 000000003324f037 R09: 0000000000000001
R10: ffffffff81f0f8f0 R11: 0000000000000000 R12: ffff88803e2e84c8
R13: dffffc0000000000 R14: ffff88803e2e8488 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000568000 CR3: 0000000097d64000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 kernfs_link_sibling+0x2bd/0x410 fs/kernfs/dir.c:370
 kernfs_add_one+0x21a/0x4c0 fs/kernfs/dir.c:786
 __kernfs_create_file+0x29c/0x350 fs/kernfs/file.c:1014
 sysfs_add_file_mode_ns+0x226/0x540 fs/sysfs/file.c:317
 create_files fs/sysfs/group.c:64 [inline]
 internal_create_group+0x328/0xb20 fs/sysfs/group.c:149
 internal_create_groups.part.0+0x90/0x140 fs/sysfs/group.c:189
 internal_create_groups fs/sysfs/group.c:185 [inline]
 sysfs_create_groups+0x25/0x50 fs/sysfs/group.c:215
 device_add_groups drivers/base/core.c:2414 [inline]
 device_add_attrs drivers/base/core.c:2562 [inline]
 device_add+0x824/0x2100 drivers/base/core.c:3275
 netdev_register_kobject+0x181/0x430 net/core/net-sysfs.c:1955
 register_netdevice+0xd33/0x1500 net/core/dev.c:10315
 nsim_init_netdevsim drivers/net/netdevsim/netdev.c:317 [inline]
 nsim_create+0x381/0x4d0 drivers/net/netdevsim/netdev.c:364
 __nsim_dev_port_add+0x32e/0x830 drivers/net/netdevsim/dev.c:1295
 nsim_dev_port_add_all+0x53/0x150 drivers/net/netdevsim/dev.c:1355
 nsim_dev_reload_create drivers/net/netdevsim/dev.c:1404 [inline]
 nsim_dev_reload_up+0x52f/0x700 drivers/net/netdevsim/dev.c:895
 devlink_reload+0x325/0x5e0 net/core/devlink.c:3919
 devlink_pernet_pre_exit+0x154/0x220 net/core/devlink.c:11295
 ops_pre_exit_list net/core/net_namespace.c:165 [inline]
 cleanup_net+0x451/0xb10 net/core/net_namespace.c:583
 process_one_work+0x98d/0x1630 kernel/workqueue.c:2276
 worker_thread+0x658/0x11f0 kernel/workqueue.c:2422
 kthread+0x3e5/0x4d0 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
Modules linked in:
---[ end trace bb47fa3d4a167e4d ]---
RIP: 0010:__rb_insert lib/rbtree.c:115 [inline]
RIP: 0010:rb_insert_color+0x6d/0x7a0 lib/rbtree.c:436
Code: 48 89 d8 48 c1 e8 03 42 80 3c 28 00 0f 85 48 05 00 00 48 8b 2b 40 f6 c5 01 0f 85 81 01 00 00 48 8d 7d 08 48 89 f8 48 c1 e8 03 <42> 80 3c 28 00 0f 85 01 05 00 00 4c 8b 75 08 49 39 de 0f 84 6d 01
RSP: 0018:ffffc90001c773f0 EFLAGS: 00010202
RAX: 0000000000000001 RBX: ffff88803e2e8698 RCX: 0000000000000000
RDX: 1ffff11007c5d099 RSI: ffff88809d327240 RDI: 0000000000000008
RBP: 0000000000000000 R08: 000000003324f037 R09: 0000000000000001
R10: ffffffff81f0f8f0 R11: 0000000000000000 R12: ffff88803e2e84c8
R13: dffffc0000000000 R14: ffff88803e2e8488 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000970004 CR3: 000000009d3a3000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/07/04 22:41 upstream 3dbdb38e2869 55aa55c2 .config console log report info ci-upstream-kasan-gce-selinux-root general protection fault in kernfs_link_sibling
* Struck through repros no longer work on HEAD.