BUG: INFO: trying to register non-static key in free_pgtables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

We found a bug in Linux 6.10 using syzkaller. It is possibly a
corrupted lock  bug.
The reproducer  is
https://gist.github.com/freexxxyyy/09beafefaba6bf750780dde92b97cab8

The bug report is:

Syzkaller hit 'INFO: trying to register non-static key in free_pgtables' bug.

INFO: trying to register non-static key.
The code is fine but needs lockdep annotation, or maybe
you didn't initialize this object before use?
turning off the locking correctness validator.
CPU: 0 PID: 8525 Comm: syz-executor118 Not tainted 6.10.0 #13
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x23d/0x360 lib/dump_stack.c:114
 assign_lock_key+0x22f/0x260 kernel/locking/lockdep.c:976
 register_lock_class+0x285/0x9a0 kernel/locking/lockdep.c:1289
 __lock_acquire+0x186/0x8050 kernel/locking/lockdep.c:5014
 lock_acquire+0x1a9/0x400 kernel/locking/lockdep.c:5754
 down_write+0x36/0x50 kernel/locking/rwsem.c:1579
 vma_start_write include/linux/mm.h:736 [inline]
 free_pgtables+0x458/0xbb0 mm/memory.c:403
 exit_mmap+0x435/0xa20 mm/mmap.c:3352
 __mmput+0x114/0x3b0 kernel/fork.c:1346
 exit_mm+0x207/0x2e0 kernel/exit.c:567
 do_exit+0x996/0x2560 kernel/exit.c:863
 do_group_exit+0x1fd/0x2b0 kernel/exit.c:1025
 get_signal+0x1697/0x1730 kernel/signal.c:2909
 arch_do_signal_or_restart+0x92/0x7f0 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+0x95/0x280 kernel/entry/common.c:218
 do_syscall_64+0x8a/0x150 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x67/0x6f
RIP: 0033:0x7fc7391d323d
Code: Unable to access opcode bytes at 0x7fc7391d3213.
RSP: 002b:00007fff88ca0c58 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: 0000000000000002 RBX: 0000000000000003 RCX: 00007fc7391d323d
RDX: 0000000020000080 RSI: 0000000000000001 RDI: 0000000000000003
RBP: 0000000000000000 R08: 00007fff88ca0ce0 R09: 00007fff88ca0ce0
R10: 002367732f766564 R11: 0000000000000246 R12: 00007fff88ca0c7c
R13: 00007fff88ca0ca0 R14: 0000000000000000 R15: 00007fff88ca0ce0
 </TASK>
------------[ cut here ]------------
DEBUG_RWSEMS_WARN_ON(sem->magic != sem): count = 0x1, magic = 0x0,
owner = 0xffff888019e43c00, curr 0xffff888019e43c00, list not empty
WARNING: CPU: 0 PID: 8525 at kernel/locking/rwsem.c:1364 __up_write
kernel/locking/rwsem.c:1364 [inline]
WARNING: CPU: 0 PID: 8525 at kernel/locking/rwsem.c:1364
up_write+0x405/0x570 kernel/locking/rwsem.c:1632
Modules linked in:
CPU: 0 PID: 8525 Comm: syz-executor118 Not tainted 6.10.0 #13
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
RIP: 0010:__up_write kernel/locking/rwsem.c:1364 [inline]
RIP: 0010:up_write+0x405/0x570 kernel/locking/rwsem.c:1632
Code: 48 c7 c7 40 7b 4c 8b 48 c7 c6 20 7d 4c 8b 48 89 da 48 8b 4c 24
20 4c 8b 44 24 30 4c 8b 4c 24 28 50 e8 ef 98 e7 ff 48 83 c4 08 <0f> 0b
e9 c0 fc ff ff 0f 0b e9 34 fd ff ff 48 89 5c 24 30 c6 05 b8
RSP: 0018:ffffc9000b517660 EFLAGS: 00010296
RAX: fb8e9a7beeddf000 RBX: 0000000000000001 RCX: ffff888019e43c00
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc9000b517738 R08: ffffffff8155a25a R09: 1ffff1100c74519a
R10: dffffc0000000000 R11: ffffed100c74519b R12: ffff888018f3eeb0
R13: ffff888018f3ee58 R14: 1ffff920016a2ed4 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff888063a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000056207a826098 CR3: 000000000d932000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 vma_start_write include/linux/mm.h:744 [inline]
 free_pgtables+0x489/0xbb0 mm/memory.c:403
 exit_mmap+0x435/0xa20 mm/mmap.c:3352
 __mmput+0x114/0x3b0 kernel/fork.c:1346
 exit_mm+0x207/0x2e0 kernel/exit.c:567
 do_exit+0x996/0x2560 kernel/exit.c:863
 do_group_exit+0x1fd/0x2b0 kernel/exit.c:1025
 get_signal+0x1697/0x1730 kernel/signal.c:2909
 arch_do_signal_or_restart+0x92/0x7f0 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+0x95/0x280 kernel/entry/common.c:218
 do_syscall_64+0x8a/0x150 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x67/0x6f
RIP: 0033:0x7fc7391d323d
Code: Unable to access opcode bytes at 0x7fc7391d3213.
RSP: 002b:00007fff88ca0c58 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: 0000000000000002 RBX: 0000000000000003 RCX: 00007fc7391d323d
RDX: 0000000020000080 RSI: 0000000000000001 RDI: 0000000000000003
RBP: 0000000000000000 R08: 00007fff88ca0ce0 R09: 00007fff88ca0ce0
R10: 002367732f766564 R11: 0000000000000246 R12: 00007fff88ca0c7c
R13: 00007fff88ca0ca0 R14: 0000000000000000 R15: 00007fff88ca0ce0
 </TASK>




-- 
Yours sincerely,
Xingyu




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux