netlink: 4 bytes leftover after parsing attributes in process `syz.2.2571'.
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.2.2571/11984 is trying to acquire lock:
ffff88816e40b4d8 (&nft_net->commit_mutex){+.+.}-{4:4}, at: nf_tables_dumpreset_obj+0x72/0xa0

but task is already holding lock:
ffff88811c53a6e8 (nlk_cb_mutex-NETFILTER){+.+.}-{4:4}, at: __netlink_dump_start+0xfe/0x7e0

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #2 (nlk_cb_mutex-NETFILTER){+.+.}-{4:4}:
       lock_acquire+0x11f/0x350
       __mutex_lock+0x19f/0x1300
       __netlink_dump_start+0xfe/0x7e0
       ip_set_dump+0x15b/0x1f0
       nfnetlink_rcv_msg+0xc00/0x12c0
       netlink_rcv_skb+0x232/0x4b0
       nfnetlink_rcv+0x2c0/0x27b0
       netlink_unicast+0x80f/0x9b0
       netlink_sendmsg+0x813/0xb40
       ____sys_sendmsg+0xa84/0xaf0
       ___sys_sendmsg+0x2a5/0x360
       __x64_sys_sendmsg+0x1bd/0x2a0
       do_syscall_64+0xf0/0xfa0
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #1 (nfnl_subsys_ipset){+.+.}-{4:4}:
       lock_acquire+0x11f/0x350
       __mutex_lock+0x19f/0x1300
       ip_set_nfnl_get_byindex+0x67/0x230
       set_match_v1_checkentry+0x71/0x230
       xt_check_match+0x430/0xaf0
       __nft_match_init+0x682/0x8d0
       nf_tables_newrule+0x17a2/0x28b0
       nfnetlink_rcv+0x1240/0x27b0
       netlink_unicast+0x80f/0x9b0
       netlink_sendmsg+0x813/0xb40
       ____sys_sendmsg+0xa84/0xaf0
       ___sys_sendmsg+0x2a5/0x360
       __x64_sys_sendmsg+0x1bd/0x2a0
       do_syscall_64+0xf0/0xfa0
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #0 (&nft_net->commit_mutex){+.+.}-{4:4}:
       validate_chain+0xb9a/0x2130
       __lock_acquire+0xab8/0xd20
       lock_acquire+0x11f/0x350
       __mutex_lock+0x19f/0x1300
       nf_tables_dumpreset_obj+0x72/0xa0
       netlink_dump+0x722/0xe80
       __netlink_dump_start+0x5cb/0x7e0
       nft_netlink_dump_start_rcu+0xdb/0x1a0
       nf_tables_getobj_reset+0x1df/0x630
       nfnetlink_rcv_msg+0x8ae/0x12c0
       netlink_rcv_skb+0x232/0x4b0
       nfnetlink_rcv+0x2c0/0x27b0
       netlink_unicast+0x80f/0x9b0
       netlink_sendmsg+0x813/0xb40
       ____sys_sendmsg+0xa84/0xaf0
       ___sys_sendmsg+0x2a5/0x360
       __x64_sys_sendmsg+0x1bd/0x2a0
       do_syscall_64+0xf0/0xfa0
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

other info that might help us debug this:

Chain exists of:
  &nft_net->commit_mutex --> nfnl_subsys_ipset --> nlk_cb_mutex-NETFILTER

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(nlk_cb_mutex-NETFILTER);
                               lock(nfnl_subsys_ipset);
                               lock(nlk_cb_mutex-NETFILTER);
  lock(&nft_net->commit_mutex);

 *** DEADLOCK ***

1 lock held by syz.2.2571/11984:
 #0: ffff88811c53a6e8 (nlk_cb_mutex-NETFILTER){+.+.}-{4:4}, at: __netlink_dump_start+0xfe/0x7e0

stack backtrace:
CPU: 0 UID: 0 PID: 11984 Comm: syz.2.2571 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Call Trace:
 <TASK>
 dump_stack_lvl+0x1a9/0x280
 print_circular_bug+0x2ed/0x300
 check_noncircular+0x134/0x160
 validate_chain+0xb9a/0x2130
 __lock_acquire+0xab8/0xd20
 lock_acquire+0x11f/0x350
 __mutex_lock+0x19f/0x1300
 nf_tables_dumpreset_obj+0x72/0xa0
 netlink_dump+0x722/0xe80
 __netlink_dump_start+0x5cb/0x7e0
 nft_netlink_dump_start_rcu+0xdb/0x1a0
 nf_tables_getobj_reset+0x1df/0x630
 nfnetlink_rcv_msg+0x8ae/0x12c0
 netlink_rcv_skb+0x232/0x4b0
 nfnetlink_rcv+0x2c0/0x27b0
 netlink_unicast+0x80f/0x9b0
 netlink_sendmsg+0x813/0xb40
 ____sys_sendmsg+0xa84/0xaf0
 ___sys_sendmsg+0x2a5/0x360
 __x64_sys_sendmsg+0x1bd/0x2a0
 do_syscall_64+0xf0/0xfa0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7feb7319c819
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007feb73fa8028 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007feb73415fa0 RCX: 00007feb7319c819
RDX: 000000002404000a RSI: 0000200000000180 RDI: 0000000000000003
RBP: 00007feb73232c91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007feb73416038 R14: 00007feb73415fa0 R15: 00007ffe2a2ae8b8
 </TASK>
