syzbot


INFO: trying to register non-static key in diAlloc

Status: upstream: reported on 2023/01/08 02:10
Subsystems: jfs
[Documentation on labels]
Reported-by: syzbot+7580bdffdae8de35f8f4@syzkaller.appspotmail.com
First crash: 474d, last: 474d

Sample crash report:
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: 1 PID: 21493 Comm: syz-executor.2 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
 assign_lock_key kernel/locking/lockdep.c:728 [inline]
 register_lock_class+0xe82/0x11c0 kernel/locking/lockdep.c:754
 __lock_acquire+0x17d/0x3ff0 kernel/locking/lockdep.c:3304
 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3908
 __mutex_lock_common kernel/locking/mutex.c:937 [inline]
 __mutex_lock+0xd7/0x1190 kernel/locking/mutex.c:1078
 diAlloc+0x810/0x1440 fs/jfs/jfs_imap.c:1381
 ialloc+0x8c/0x970 fs/jfs/jfs_inode.c:69
 jfs_mkdir.part.0+0x131/0x870 fs/jfs/namei.c:237
 jfs_mkdir+0x3f/0x60 fs/jfs/namei.c:222
 vfs_mkdir+0x508/0x7a0 fs/namei.c:3819
 do_mkdirat+0x262/0x2d0 fs/namei.c:3842
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f18193070e7
Code: 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 02 01 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f1817879f88 EFLAGS: 00000246 ORIG_RAX: 0000000000000102
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f18193070e7
RDX: 00000000000001ff RSI: 0000000020000500 RDI: 00000000ffffff9c
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000020000500 R14: 00007f1817879fe0 R15: 0000000000000000
==================================================================
BUG: KASAN: slab-out-of-bounds in atomic64_read include/asm-generic/atomic-instrumented.h:27 [inline]
BUG: KASAN: slab-out-of-bounds in atomic_long_read include/asm-generic/atomic-long.h:47 [inline]
BUG: KASAN: slab-out-of-bounds in __mutex_trylock_or_owner kernel/locking/mutex.c:84 [inline]
BUG: KASAN: slab-out-of-bounds in __mutex_trylock kernel/locking/mutex.c:125 [inline]
BUG: KASAN: slab-out-of-bounds in __mutex_lock_common kernel/locking/mutex.c:939 [inline]
BUG: KASAN: slab-out-of-bounds in __mutex_lock+0xe4/0x1190 kernel/locking/mutex.c:1078
Read of size 8 at addr ffff888094067ae8 by task syz-executor.2/21493

CPU: 1 PID: 21493 Comm: syz-executor.2 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256
 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354
 kasan_report+0x8f/0xa0 mm/kasan/report.c:412
 atomic64_read include/asm-generic/atomic-instrumented.h:27 [inline]
 atomic_long_read include/asm-generic/atomic-long.h:47 [inline]
 __mutex_trylock_or_owner kernel/locking/mutex.c:84 [inline]
 __mutex_trylock kernel/locking/mutex.c:125 [inline]
 __mutex_lock_common kernel/locking/mutex.c:939 [inline]
 __mutex_lock+0xe4/0x1190 kernel/locking/mutex.c:1078
 diAlloc+0x810/0x1440 fs/jfs/jfs_imap.c:1381
 ialloc+0x8c/0x970 fs/jfs/jfs_inode.c:69
 jfs_mkdir.part.0+0x131/0x870 fs/jfs/namei.c:237
 jfs_mkdir+0x3f/0x60 fs/jfs/namei.c:222
 vfs_mkdir+0x508/0x7a0 fs/namei.c:3819
 do_mkdirat+0x262/0x2d0 fs/namei.c:3842
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f18193070e7
Code: 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 02 01 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f1817879f88 EFLAGS: 00000246 ORIG_RAX: 0000000000000102
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f18193070e7
RDX: 00000000000001ff RSI: 0000000020000500 RDI: 00000000ffffff9c
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000020000500 R14: 00007f1817879fe0 R15: 0000000000000000

Allocated by task 8170:
 __do_kmalloc mm/slab.c:3727 [inline]
 __kmalloc+0x15a/0x3c0 mm/slab.c:3736
 kmalloc include/linux/slab.h:520 [inline]
 kzalloc include/linux/slab.h:709 [inline]
 __register_sysctl_table+0x112/0x1090 fs/proc/proc_sysctl.c:1310
 neigh_sysctl_register+0x341/0x680 net/core/neighbour.c:3260
 addrconf_sysctl_register+0xb6/0x1d0 net/ipv6/addrconf.c:6647
 ipv6_add_dev+0xa8a/0x10b0 net/ipv6/addrconf.c:446
 addrconf_notify+0x6a3/0x21f0 net/ipv6/addrconf.c:3447
 notifier_call_chain+0xc0/0x230 kernel/notifier.c:93
 call_netdevice_notifiers net/core/dev.c:1762 [inline]
 register_netdevice+0xdd2/0x10f0 net/core/dev.c:8761
 veth_newlink+0x3eb/0x930 drivers/net/veth.c:1142
 rtnl_newlink+0x1030/0x15c0 net/core/rtnetlink.c:3141
 rtnetlink_rcv_msg+0x453/0xb80 net/core/rtnetlink.c:4782
 netlink_rcv_skb+0x160/0x440 net/netlink/af_netlink.c:2463
 netlink_unicast_kernel net/netlink/af_netlink.c:1325 [inline]
 netlink_unicast+0x4d5/0x690 net/netlink/af_netlink.c:1351
 netlink_sendmsg+0x6c3/0xc50 net/netlink/af_netlink.c:1917
 sock_sendmsg_nosec net/socket.c:651 [inline]
 sock_sendmsg+0xc3/0x120 net/socket.c:661
 __sys_sendto+0x21a/0x320 net/socket.c:1899
 __do_sys_sendto net/socket.c:1911 [inline]
 __se_sys_sendto net/socket.c:1907 [inline]
 __x64_sys_sendto+0xdd/0x1b0 net/socket.c:1907
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

Freed by task 8131:
 __cache_free mm/slab.c:3503 [inline]
 kfree+0xcc/0x210 mm/slab.c:3822
 skb_free_head net/core/skbuff.c:563 [inline]
 skb_release_data+0x6de/0x920 net/core/skbuff.c:583
 skb_release_all net/core/skbuff.c:640 [inline]
 __kfree_skb net/core/skbuff.c:654 [inline]
 consume_skb+0x113/0x3d0 net/core/skbuff.c:714
 __dev_kfree_skb_any+0x9c/0xc0 net/core/dev.c:2796
 dev_consume_skb_any include/linux/netdevice.h:3567 [inline]
 napi_consume_skb+0x45d/0x5e0 net/core/skbuff.c:778
 free_old_xmit_skbs+0xea/0x270 drivers/net/virtio_net.c:1395
 start_xmit+0x156/0x17a0 drivers/net/virtio_net.c:1611
 __netdev_start_xmit include/linux/netdevice.h:4349 [inline]
 netdev_start_xmit include/linux/netdevice.h:4363 [inline]
 xmit_one net/core/dev.c:3256 [inline]
 dev_hard_start_xmit+0x1a8/0x920 net/core/dev.c:3272
 sch_direct_xmit+0x2d6/0xf70 net/sched/sch_generic.c:332
 qdisc_restart net/sched/sch_generic.c:395 [inline]
 __qdisc_run+0x4d0/0x1640 net/sched/sch_generic.c:403
 qdisc_run include/net/pkt_sched.h:120 [inline]
 __dev_xmit_skb net/core/dev.c:3451 [inline]
 __dev_queue_xmit+0x2102/0x2e00 net/core/dev.c:3807
 neigh_hh_output include/net/neighbour.h:491 [inline]
 neigh_output include/net/neighbour.h:499 [inline]
 ip_finish_output2+0xb6d/0x15a0 net/ipv4/ip_output.c:230
 ip_finish_output+0xae9/0x10b0 net/ipv4/ip_output.c:318
 NF_HOOK_COND include/linux/netfilter.h:278 [inline]
 ip_output+0x203/0x5f0 net/ipv4/ip_output.c:406
 dst_output include/net/dst.h:455 [inline]
 ip_local_out+0xaf/0x170 net/ipv4/ip_output.c:125
 __ip_queue_xmit+0x91e/0x1c10 net/ipv4/ip_output.c:507
 __tcp_transmit_skb+0x1b9c/0x3400 net/ipv4/tcp_output.c:1148
 __tcp_send_ack.part.0+0x3d9/0x5c0 net/ipv4/tcp_output.c:3643
 __tcp_send_ack net/ipv4/tcp_output.c:3649 [inline]
 tcp_send_ack+0x7d/0xa0 net/ipv4/tcp_output.c:3649
 tcp_cleanup_rbuf+0x30f/0x600 net/ipv4/tcp.c:1604
 tcp_recvmsg+0xa8c/0x2a90 net/ipv4/tcp.c:2177
 inet_recvmsg+0x124/0x5c0 net/ipv4/af_inet.c:830
 sock_recvmsg_nosec net/socket.c:859 [inline]
 sock_recvmsg net/socket.c:866 [inline]
 sock_recvmsg net/socket.c:862 [inline]
 sock_read_iter+0x339/0x470 net/socket.c:944
 call_read_iter include/linux/fs.h:1815 [inline]
 new_sync_read fs/read_write.c:406 [inline]
 __vfs_read+0x518/0x750 fs/read_write.c:418
 vfs_read+0x194/0x3c0 fs/read_write.c:452
 ksys_read+0x12b/0x2a0 fs/read_write.c:579
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

The buggy address belongs to the object at ffff888094067680
 which belongs to the cache kmalloc-1024 of size 1024
The buggy address is located 104 bytes to the right of
 1024-byte region [ffff888094067680, ffff888094067a80)
The buggy address belongs to the page:
page:ffffea0002501980 count:1 mapcount:0 mapping:ffff88813bff0ac0 index:0xffff888094066480 compound_mapcount: 0
flags: 0xfff00000008100(slab|head)
raw: 00fff00000008100 ffffea0002bf9408 ffffea00024f9008 ffff88813bff0ac0
raw: ffff888094066480 ffff888094066000 0000000100000006 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff888094067980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff888094067a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888094067a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                                                          ^
 ffff888094067b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff888094067b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/01/08 02:10 linux-4.19.y 3f8a27f9e27b 1dac8c7a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 INFO: trying to register non-static key in diAlloc
* Struck through repros no longer work on HEAD.