Hello,
syzbot found the following crash on:
HEAD commit: b0cdffaa Linux 4.14.163
git tree: linux-4.14.y
console output:
https://syzkaller.appspot.com/x/log.txt?x=121f2d49e00000
kernel config:
https://syzkaller.appspot.com/x/.config?x=19269c071a1fe30
dashboard link:
https://syzkaller.appspot.com/bug?extid=682e88cf0cbf9bf5d093
compiler: gcc (GCC) 9.0.0 20181231 (experimental)
Unfortunately, I don't have any reproducer for this crash yet.
IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by:
syzbot+682e88...@syzkaller.appspotmail.com
======================================================
WARNING: possible circular locking dependency detected
4.14.163-syzkaller #0 Not tainted
------------------------------------------------------
syz-executor.2/9393 is trying to acquire lock:
(&xt[i].mutex){+.+.}, at: [<ffffffff854e140e>] xt_find_target+0x3e/0x1e0
net/netfilter/x_tables.c:232
but task is already holding lock:
(rtnl_mutex){+.+.}, at: [<ffffffff85237119>] rtnl_lock
net/core/rtnetlink.c:72 [inline]
(rtnl_mutex){+.+.}, at: [<ffffffff85237119>] rtnetlink_rcv_msg+0x339/0xb70
net/core/rtnetlink.c:4301
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #1 (rtnl_mutex){+.+.}:
lock_acquire+0x16f/0x430 kernel/locking/lockdep.c:3994
__mutex_lock_common kernel/locking/mutex.c:756 [inline]
__mutex_lock+0xe8/0x1470 kernel/locking/mutex.c:893
mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908
rtnl_lock+0x17/0x20 net/core/rtnetlink.c:72
unregister_netdevice_notifier+0x5f/0x2c0 net/core/dev.c:1634
tee_tg_destroy+0x61/0xc0 net/netfilter/xt_TEE.c:123
cleanup_entry+0x1a6/0x260 net/ipv6/netfilter/ip6_tables.c:684
__do_replace+0x3c5/0x5c0 net/ipv6/netfilter/ip6_tables.c:1105
do_replace net/ipv6/netfilter/ip6_tables.c:1161 [inline]
do_ip6t_set_ctl+0x296/0x3f4 net/ipv6/netfilter/ip6_tables.c:1685
nf_sockopt net/netfilter/nf_sockopt.c:106 [inline]
nf_setsockopt+0x67/0xc0 net/netfilter/nf_sockopt.c:115
ipv6_setsockopt net/ipv6/ipv6_sockglue.c:930 [inline]
ipv6_setsockopt+0x105/0x130 net/ipv6/ipv6_sockglue.c:914
udpv6_setsockopt+0x4e/0x90 net/ipv6/udp.c:1459
sock_common_setsockopt+0x94/0xd0 net/core/sock.c:2968
SYSC_setsockopt net/socket.c:1865 [inline]
SyS_setsockopt+0x13c/0x210 net/socket.c:1844
do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x42/0xb7
-> #0 (&xt[i].mutex){+.+.}:
check_prev_add kernel/locking/lockdep.c:1901 [inline]
check_prevs_add kernel/locking/lockdep.c:2018 [inline]
validate_chain kernel/locking/lockdep.c:2460 [inline]
__lock_acquire+0x2cb3/0x4620 kernel/locking/lockdep.c:3487
lock_acquire+0x16f/0x430 kernel/locking/lockdep.c:3994
__mutex_lock_common kernel/locking/mutex.c:756 [inline]
__mutex_lock+0xe8/0x1470 kernel/locking/mutex.c:893
mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908
xt_find_target+0x3e/0x1e0 net/netfilter/x_tables.c:232
xt_request_find_target net/netfilter/x_tables.c:261 [inline]
xt_request_find_target+0x74/0xe0 net/netfilter/x_tables.c:254
ipt_init_target+0xce/0x290 net/sched/act_ipt.c:45
__tcf_ipt_init+0x48c/0xb50 net/sched/act_ipt.c:168
tcf_xt_init+0x4e/0x60 net/sched/act_ipt.c:210
tcf_action_init_1+0x53c/0xaa0 net/sched/act_api.c:682
tcf_action_init+0x2ab/0x480 net/sched/act_api.c:751
tcf_action_add net/sched/act_api.c:1079 [inline]
tc_ctl_action+0x30a/0x548 net/sched/act_api.c:1131
rtnetlink_rcv_msg+0x3da/0xb70 net/core/rtnetlink.c:4306
netlink_rcv_skb+0x14f/0x3c0 net/netlink/af_netlink.c:2432
rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:4318
netlink_unicast_kernel net/netlink/af_netlink.c:1286 [inline]
netlink_unicast+0x44d/0x650 net/netlink/af_netlink.c:1312
netlink_sendmsg+0x7c4/0xc60 net/netlink/af_netlink.c:1877
sock_sendmsg_nosec net/socket.c:646 [inline]
sock_sendmsg+0xce/0x110 net/socket.c:656
___sys_sendmsg+0x70a/0x840 net/socket.c:2062
__sys_sendmsg+0xb9/0x140 net/socket.c:2096
SYSC_sendmsg net/socket.c:2107 [inline]
SyS_sendmsg+0x2d/0x50 net/socket.c:2103
do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x42/0xb7
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(rtnl_mutex);
lock(&xt[i].mutex);
lock(rtnl_mutex);
lock(&xt[i].mutex);
*** DEADLOCK ***
1 lock held by syz-executor.2/9393:
#0: (rtnl_mutex){+.+.}, at: [<ffffffff85237119>] rtnl_lock
net/core/rtnetlink.c:72 [inline]
#0: (rtnl_mutex){+.+.}, at: [<ffffffff85237119>]
rtnetlink_rcv_msg+0x339/0xb70 net/core/rtnetlink.c:4301
stack backtrace:
CPU: 0 PID: 9393 Comm: syz-executor.2 Not tainted 4.14.163-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:17 [inline]
dump_stack+0x142/0x197 lib/dump_stack.c:58
print_circular_bug.isra.0.cold+0x1cc/0x28f kernel/locking/lockdep.c:1258
check_prev_add kernel/locking/lockdep.c:1901 [inline]
check_prevs_add kernel/locking/lockdep.c:2018 [inline]
validate_chain kernel/locking/lockdep.c:2460 [inline]
__lock_acquire+0x2cb3/0x4620 kernel/locking/lockdep.c:3487
lock_acquire+0x16f/0x430 kernel/locking/lockdep.c:3994
__mutex_lock_common kernel/locking/mutex.c:756 [inline]
__mutex_lock+0xe8/0x1470 kernel/locking/mutex.c:893
mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908
xt_find_target+0x3e/0x1e0 net/netfilter/x_tables.c:232
xt_request_find_target net/netfilter/x_tables.c:261 [inline]
xt_request_find_target+0x74/0xe0 net/netfilter/x_tables.c:254
ipt_init_target+0xce/0x290 net/sched/act_ipt.c:45
__tcf_ipt_init+0x48c/0xb50 net/sched/act_ipt.c:168
tcf_xt_init+0x4e/0x60 net/sched/act_ipt.c:210
tcf_action_init_1+0x53c/0xaa0 net/sched/act_api.c:682
tcf_action_init+0x2ab/0x480 net/sched/act_api.c:751
tcf_action_add net/sched/act_api.c:1079 [inline]
tc_ctl_action+0x30a/0x548 net/sched/act_api.c:1131
rtnetlink_rcv_msg+0x3da/0xb70 net/core/rtnetlink.c:4306
netlink_rcv_skb+0x14f/0x3c0 net/netlink/af_netlink.c:2432
rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:4318
netlink_unicast_kernel net/netlink/af_netlink.c:1286 [inline]
netlink_unicast+0x44d/0x650 net/netlink/af_netlink.c:1312
netlink_sendmsg+0x7c4/0xc60 net/netlink/af_netlink.c:1877
sock_sendmsg_nosec net/socket.c:646 [inline]
sock_sendmsg+0xce/0x110 net/socket.c:656
___sys_sendmsg+0x70a/0x840 net/socket.c:2062
__sys_sendmsg+0xb9/0x140 net/socket.c:2096
SYSC_sendmsg net/socket.c:2107 [inline]
SyS_sendmsg+0x2d/0x50 net/socket.c:2103
do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x45af49
RSP: 002b:00007f84bd13dc78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000045af49
RDX: 0000000000000000 RSI: 0000000020000300 RDI: 0000000000000003
RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f84bd13e6d4
R13: 00000000004ca9fe R14: 00000000004e3e78 R15: 00000000ffffffff
overlayfs: unrecognized mount option "nfs_export=off" or missing value
overlayfs: unrecognized mount option "nfs_export=off" or missing value
overlayfs: unrecognized mount option "nfs_export=off" or missing value
IPVS: ftp: loaded support on port[0] = 21
net_ratelimit: 26 callbacks suppressed
protocol 88fb is buggy, dev hsr_slave_0
protocol 88fb is buggy, dev hsr_slave_0
protocol 88fb is buggy, dev hsr_slave_1
protocol 88fb is buggy, dev hsr_slave_1
protocol 88fb is buggy, dev hsr_slave_0
protocol 88fb is buggy, dev hsr_slave_1
overlayfs: unrecognized mount option "nfs_export=off" or missing value
protocol 88fb is buggy, dev hsr_slave_0
protocol 88fb is buggy, dev hsr_slave_1
overlayfs: unrecognized mount option "nfs_export=off" or missing value
protocol 88fb is buggy, dev hsr_slave_0
protocol 88fb is buggy, dev hsr_slave_0
overlayfs: unrecognized mount option "nfs_export=off" or missing value
IPVS: ftp: loaded support on port[0] = 21
overlayfs: unrecognized mount option "nfs_export=off" or missing value
tc_ctl_action: received NO action attribs
tc_ctl_action: received NO action attribs
IPVS: ftp: loaded support on port[0] = 21
tc_ctl_action: received NO action attribs
overlayfs: unrecognized mount option "nfs_export=off" or missing value
overlayfs: unrecognized mount option "nfs_export=off" or missing value
overlayfs: unrecognized mount option "nfs_export=off" or missing value
overlayfs: unrecognized mount option "nfs_export=off" or missing value
net_ratelimit: 28 callbacks suppressed
protocol 88fb is buggy, dev hsr_slave_0
protocol 88fb is buggy, dev hsr_slave_1
overlayfs: unrecognized mount option "nfs_export=off" or missing value
protocol 88fb is buggy, dev hsr_slave_0
protocol 88fb is buggy, dev hsr_slave_1
protocol 88fb is buggy, dev hsr_slave_0
protocol 88fb is buggy, dev hsr_slave_0
protocol 88fb is buggy, dev hsr_slave_1
protocol 88fb is buggy, dev hsr_slave_1
protocol 88fb is buggy, dev hsr_slave_0
protocol 88fb is buggy, dev hsr_slave_1
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
overlayfs: unrecognized mount option "nfs_export=off" or missing value
general protection fault: 0000 [#1] PREEMPT SMP KASAN
IPVS: ftp: loaded support on port[0] = 21
Modules linked in:
CPU: 1 PID: 9769 Comm: syz-executor.2 Not tainted 4.14.163-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS
Google 01/01/2011
task: ffff8881f1f24680 task.stack: ffff8881f19c0000
RIP: 0010:ipt_init_target+0xa9/0x290 net/sched/act_ipt.c:46
RSP: 0018:ffff8881f19c7108 EFLAGS: 00010202
RAX: 0000000000000005 RBX: dffffc0000000000 RCX: 0000000000000000
RDX: 0000000000000007 RSI: ffffffff85300b36 RDI: 000000000000002f
RBP: ffff8881f19c7248 R08: 1ffff110141269e0 R09: ffffed10141269e1
R10: ffffed10141269e0 R11: ffff8880a0934f06 R12: 0000000000000010
R13: 1ffff1103e338e24 R14: ffff8881f19c7220 R15: ffff88808d1f8ac0
FS: 00007f84bd13e700(0000) GS:ffff8880aed00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f6eacd5bd90 CR3: 0000000094e19000 CR4: 00000000001426e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
__tcf_ipt_init+0x48c/0xb50 net/sched/act_ipt.c:168
tcf_xt_init+0x4e/0x60 net/sched/act_ipt.c:210
tcf_action_init_1+0x53c/0xaa0 net/sched/act_api.c:682
tcf_action_init+0x2ab/0x480 net/sched/act_api.c:751
tcf_action_add net/sched/act_api.c:1079 [inline]
tc_ctl_action+0x30a/0x548 net/sched/act_api.c:1131
rtnetlink_rcv_msg+0x3da/0xb70 net/core/rtnetlink.c:4306
netlink_rcv_skb+0x14f/0x3c0 net/netlink/af_netlink.c:2432
rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:4318
netlink_unicast_kernel net/netlink/af_netlink.c:1286 [inline]
netlink_unicast+0x44d/0x650 net/netlink/af_netlink.c:1312
netlink_sendmsg+0x7c4/0xc60 net/netlink/af_netlink.c:1877
sock_sendmsg_nosec net/socket.c:646 [inline]
sock_sendmsg+0xce/0x110 net/socket.c:656
___sys_sendmsg+0x70a/0x840 net/socket.c:2062
__sys_sendmsg+0xb9/0x140 net/socket.c:2096
SYSC_sendmsg net/socket.c:2107 [inline]
SyS_sendmsg+0x2d/0x50 net/socket.c:2103
do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x45af49
RSP: 002b:00007f84bd13dc78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 000000000045af49
RDX: 0000000000000000 RSI: 0000000020000300 RDI: 0000000000000003
RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f84bd13e6d4
R13: 00000000004ca9fe R14: 00000000004e3e78 R15: 00000000ffffffff
Code: f3 f3 f3 e8 4a 18 2d fc 31 c0 b9 0e 00 00 00 48 8d bd 48 ff ff ff f3
48 ab 49 8d 7c 24 1f 48 89 f8 48 89 fa 48 c1 e8 03 83 e2 07 <0f> b6 04 18
38 d0 7f 08 84 c0 0f 85 90 01 00 00 41 0f b6 54 24
RIP: ipt_init_target+0xa9/0x290 net/sched/act_ipt.c:46 RSP: ffff8881f19c7108
---[ end trace e89b6a552ca57b85 ]---
---
This bug is generated by a bot. It may contain errors.
See
https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at
syzk...@googlegroups.com.
syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.