syz-executor6 uses obsolete (PF_INET,SOCK_PACKET) ====================================================== WARNING: possible circular locking dependency detected 4.15.0+ #295 Not tainted ------------------------------------------------------ syz-executor4/5855 is trying to acquire lock: (sk_lock-AF_INET){+.+.}, at: [<000000009b071938>] lock_sock include/net/sock.h:1461 [inline] (sk_lock-AF_INET){+.+.}, at: [<000000009b071938>] do_ip_setsockopt.isra.12+0x1d9/0x3210 net/ipv4/ip_sockglue.c:646 but task is already holding lock: (rtnl_mutex){+.+.}, at: [<00000000078f5b84>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (rtnl_mutex){+.+.}: __mutex_lock_common kernel/locking/mutex.c:756 [inline] __mutex_lock+0x16f/0x1a80 kernel/locking/mutex.c:893 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908 rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 register_netdevice_notifier+0xad/0x860 net/core/dev.c:1607 tee_tg_check+0x1a0/0x280 net/netfilter/xt_TEE.c:106 xt_check_target+0x22c/0x7d0 net/netfilter/x_tables.c:845 check_target net/ipv4/netfilter/ip_tables.c:513 [inline] find_check_entry.isra.8+0x8c8/0xcb0 net/ipv4/netfilter/ip_tables.c:554 translate_table+0xed1/0x1610 net/ipv4/netfilter/ip_tables.c:725 do_replace net/ipv4/netfilter/ip_tables.c:1141 [inline] do_ipt_set_ctl+0x370/0x5f0 net/ipv4/netfilter/ip_tables.c:1675 nf_sockopt net/netfilter/nf_sockopt.c:106 [inline] nf_setsockopt+0x67/0xc0 net/netfilter/nf_sockopt.c:115 ip_setsockopt+0xa1/0xb0 net/ipv4/ip_sockglue.c:1260 sctp_setsockopt+0x2b6/0x61d0 net/sctp/socket.c:4104 sock_common_setsockopt+0x95/0xd0 net/core/sock.c:2978 SYSC_setsockopt net/socket.c:1849 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1828 entry_SYSCALL_64_fastpath+0x29/0xa0 -> #0 (sk_lock-AF_INET){+.+.}: lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3920 lock_sock_nested+0xc2/0x110 net/core/sock.c:2780 lock_sock include/net/sock.h:1461 [inline] do_ip_setsockopt.isra.12+0x1d9/0x3210 net/ipv4/ip_sockglue.c:646 ip_setsockopt+0x3a/0xb0 net/ipv4/ip_sockglue.c:1252 dccp_setsockopt+0x85/0xd0 net/dccp/proto.c:576 sock_common_setsockopt+0x95/0xd0 net/core/sock.c:2978 SYSC_setsockopt net/socket.c:1849 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1828 entry_SYSCALL_64_fastpath+0x29/0xa0 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(rtnl_mutex); lock(sk_lock-AF_INET); lock(rtnl_mutex); lock(sk_lock-AF_INET); *** DEADLOCK *** 1 lock held by syz-executor4/5855: #0: (rtnl_mutex){+.+.}, at: [<00000000078f5b84>] rtnl_lock+0x17/0x20 net/core/rtnetlink.c:74 stack backtrace: CPU: 0 PID: 5855 Comm: syz-executor4 Not tainted 4.15.0+ #295 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+0x194/0x257 lib/dump_stack.c:53 print_circular_bug.isra.38+0x2cd/0x2dc kernel/locking/lockdep.c:1223 check_prev_add kernel/locking/lockdep.c:1863 [inline] check_prevs_add kernel/locking/lockdep.c:1976 [inline] validate_chain kernel/locking/lockdep.c:2417 [inline] __lock_acquire+0x30a8/0x3e00 kernel/locking/lockdep.c:3431 lock_acquire+0x1d5/0x580 kernel/locking/lockdep.c:3920 lock_sock_nested+0xc2/0x110 net/core/sock.c:2780 lock_sock include/net/sock.h:1461 [inline] do_ip_setsockopt.isra.12+0x1d9/0x3210 net/ipv4/ip_sockglue.c:646 ip_setsockopt+0x3a/0xb0 net/ipv4/ip_sockglue.c:1252 dccp_setsockopt+0x85/0xd0 net/dccp/proto.c:576 sock_common_setsockopt+0x95/0xd0 net/core/sock.c:2978 SYSC_setsockopt net/socket.c:1849 [inline] SyS_setsockopt+0x189/0x360 net/socket.c:1828 entry_SYSCALL_64_fastpath+0x29/0xa0 RIP: 0033:0x453299 RSP: 002b:00007f860ea8dc58 EFLAGS: 00000212 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007f860ea8e700 RCX: 0000000000453299 RDX: 000000000000002d RSI: 0000000000000000 RDI: 0000000000000013 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 000000002024e000 R11: 0000000000000212 R12: 0000000000000000 R13: 0000000000a2f33f R14: 00007f860ea8e9c0 R15: 0000000000000000 netlink: 'syz-executor5': attribute type 21 has an invalid length. QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl mmap: syz-executor1 (5939) uses deprecated remap_file_pages() syscall. See Documentation/vm/remap_file_pages.txt. semctl(GETNCNT/GETZCNT) is since 3.16 Single Unix Specification compliant. The task syz-executor2 (5957) triggered the difference, watch for misbehavior. audit: type=1400 audit(1517706498.395:53): avc: denied { map } for pid=5918 comm="syz-executor5" path="pipe:[15509]" dev="pipefs" ino=15509 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=fifo_file permissive=1 audit: type=1400 audit(1517706498.396:54): avc: denied { execute } for pid=5918 comm="syz-executor5" path="pipe:[15509]" dev="pipefs" ino=15509 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=fifo_file permissive=1 audit: type=1400 audit(1517706498.533:55): avc: denied { ipc_lock } for pid=5977 comm="syz-executor2" capability=14 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1 sg_write: data in/out 700410/58 bytes for SCSI command 0xe2-- guessing data in; program syz-executor2 not setting count and/or reply_len properly sg_write: data in/out 700410/58 bytes for SCSI command 0xe2-- guessing data in; program syz-executor2 not setting count and/or reply_len properly sg_write: data in/out 700410/58 bytes for SCSI command 0xe2-- guessing data in; program syz-executor2 not setting count and/or reply_len properly sg_write: data in/out 700410/58 bytes for SCSI command 0xe2-- guessing data in; program syz-executor2 not setting count and/or reply_len properly sg_write: data in/out 700410/58 bytes for SCSI command 0xe2-- guessing data in; program syz-executor2 not setting count and/or reply_len properly sg_write: data in/out 700410/58 bytes for SCSI command 0xe2-- guessing data in; program syz-executor2 not setting count and/or reply_len properly QAT: Invalid ioctl sg_write: data in/out 700410/58 bytes for SCSI command 0xe2-- guessing data in; program syz-executor2 not setting count and/or reply_len properly netlink: 3 bytes leftover after parsing attributes in process `syz-executor3'. sg_write: data in/out 700410/58 bytes for SCSI command 0xe2-- guessing data in; program syz-executor2 not setting count and/or reply_len properly sg_write: data in/out 700410/58 bytes for SCSI command 0xe2-- guessing data in; program syz-executor6 not setting count and/or reply_len properly sg_write: data in/out 700410/58 bytes for SCSI command 0xe2-- guessing data in; program syz-executor3 not setting count and/or reply_len properly dst_release: dst:00000000f84a80bd refcnt:-1 QAT: Invalid ioctl QAT: Invalid ioctl audit: type=1326 audit(1517706501.300:56): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6444 comm="syz-executor6" exe="/root/syz-executor6" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 FAULT_INJECTION: forcing a failure. name fail_page_alloc, interval 1, probability 0, space 0, times 1 audit: type=1326 audit(1517706501.325:57): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6444 comm="syz-executor6" exe="/root/syz-executor6" sig=0 arch=c000003e syscall=9 compat=0 ip=0x453299 code=0x7ffc0000 CPU: 0 PID: 6475 Comm: syz-executor7 Not tainted 4.15.0+ #295 audit: type=1326 audit(1517706501.335:58): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6444 comm="syz-executor6" exe="/root/syz-executor6" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 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+0x194/0x257 lib/dump_stack.c:53 audit: type=1326 audit(1517706501.335:59): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6444 comm="syz-executor6" exe="/root/syz-executor6" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 fail_dump lib/fault-inject.c:51 [inline] should_fail+0x8c0/0xa40 lib/fault-inject.c:149 audit: type=1326 audit(1517706501.412:60): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6444 comm="syz-executor6" exe="/root/syz-executor6" sig=0 arch=c000003e syscall=16 compat=0 ip=0x453299 code=0x7ffc0000 audit: type=1326 audit(1517706501.412:61): auid=4294967295 uid=0 gid=0 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 pid=6444 comm="syz-executor6" exe="/root/syz-executor6" sig=0 arch=c000003e syscall=202 compat=0 ip=0x453299 code=0x7ffc0000 should_fail_alloc_page mm/page_alloc.c:2955 [inline] prepare_alloc_pages mm/page_alloc.c:4194 [inline] __alloc_pages_nodemask+0x338/0xd80 mm/page_alloc.c:4233 alloc_pages_current+0xb6/0x1e0 mm/mempolicy.c:2055 alloc_pages include/linux/gfp.h:492 [inline] skb_page_frag_refill+0x358/0x5f0 net/core/sock.c:2211 tun_build_skb.isra.50+0x2f0/0x1810 drivers/net/tun.c:1630 tun_get_user+0x17d0/0x3940 drivers/net/tun.c:1800 tun_chr_write_iter+0xb9/0x160 drivers/net/tun.c:1986 call_write_iter include/linux/fs.h:1781 [inline] do_iter_readv_writev+0x55c/0x830 fs/read_write.c:653 do_iter_write+0x154/0x540 fs/read_write.c:932 vfs_writev+0x18a/0x340 fs/read_write.c:977 do_writev+0xfc/0x2a0 fs/read_write.c:1012 SYSC_writev fs/read_write.c:1085 [inline] SyS_writev+0x27/0x30 fs/read_write.c:1082 entry_SYSCALL_64_fastpath+0x29/0xa0 RIP: 0033:0x453171 RSP: 002b:00007ffb6f627b80 EFLAGS: 00000293 ORIG_RAX: 0000000000000014 RAX: ffffffffffffffda RBX: 00007ffb6f627aa0 RCX: 0000000000453171 RDX: 0000000000000001 RSI: 00007ffb6f627bd0 RDI: 0000000000000012 RBP: 00007ffb6f627a90 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000046 R11: 0000000000000293 R12: 00000000004b8096 R13: 00007ffb6f627bc8 R14: 00000000004b8096 R15: 0000000000000000 SELinux: unrecognized netlink message: protocol=6 nlmsg_type=52 sclass=netlink_xfrm_socket pig=6516 comm=syz-executor3 SELinux: unrecognized netlink message: protocol=6 nlmsg_type=52 sclass=netlink_xfrm_socket pig=6516 comm=syz-executor3 SELinux: unrecognized netlink message: protocol=6 nlmsg_type=52 sclass=netlink_xfrm_socket pig=6531 comm=syz-executor3 FAULT_INJECTION: forcing a failure. name fail_page_alloc, interval 1, probability 0, space 0, times 0 CPU: 0 PID: 6558 Comm: syz-executor6 Not tainted 4.15.0+ #295 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+0x194/0x257 lib/dump_stack.c:53 fail_dump lib/fault-inject.c:51 [inline] should_fail+0x8c0/0xa40 lib/fault-inject.c:149 should_fail_alloc_page mm/page_alloc.c:2955 [inline] prepare_alloc_pages mm/page_alloc.c:4194 [inline] __alloc_pages_nodemask+0x338/0xd80 mm/page_alloc.c:4233 alloc_pages_current+0xb6/0x1e0 mm/mempolicy.c:2055 alloc_pages include/linux/gfp.h:492 [inline] skb_page_frag_refill+0x358/0x5f0 net/core/sock.c:2211 tun_build_skb.isra.50+0x2f0/0x1810 drivers/net/tun.c:1630 tun_get_user+0x17d0/0x3940 drivers/net/tun.c:1800 tun_chr_write_iter+0xb9/0x160 drivers/net/tun.c:1986 call_write_iter include/linux/fs.h:1781 [inline] do_iter_readv_writev+0x55c/0x830 fs/read_write.c:653 do_iter_write+0x154/0x540 fs/read_write.c:932 vfs_writev+0x18a/0x340 fs/read_write.c:977 do_writev+0xfc/0x2a0 fs/read_write.c:1012 SYSC_writev fs/read_write.c:1085 [inline] SyS_writev+0x27/0x30 fs/read_write.c:1082 entry_SYSCALL_64_fastpath+0x29/0xa0 RIP: 0033:0x453171 RSP: 002b:00007fc8ae049b80 EFLAGS: 00000293 ORIG_RAX: 0000000000000014 RAX: ffffffffffffffda RBX: 00007fc8ae049aa0 RCX: 0000000000453171 RDX: 0000000000000001 RSI: 00007fc8ae049bd0 RDI: 0000000000000012 RBP: 00007fc8ae049a90 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000046 R11: 0000000000000293 R12: 00000000004b8096 R13: 00007fc8ae049bc8 R14: 00000000004b8096 R15: 0000000000000000 QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl QAT: Invalid ioctl sg_write: 54 callbacks suppressed sg_write: data in/out 700410/58 bytes for SCSI command 0xe2-- guessing data in; program syz-executor3 not setting count and/or reply_len properly sg_write: data in/out 700410/58 bytes for SCSI command 0xe2-- guessing data in; program syz-executor3 not setting count and/or reply_len properly sg_write: data in/out 700410/58 bytes for SCSI command 0xe2-- guessing data in; program syz-executor3 not setting count and/or reply_len properly sg_write: data in/out 700410/58 bytes for SCSI command 0xe2-- guessing data in; program syz-executor3 not setting count and/or reply_len properly sg_write: data in/out 700410/58 bytes for SCSI command 0xe2-- guessing data in; program syz-executor3 not setting count and/or reply_len properly sg_write: data in/out 700410/2 bytes for SCSI command 0xe2-- guessing data in; program syz-executor4 not setting count and/or reply_len properly sg_write: data in/out 700410/2 bytes for SCSI command 0xe2-- guessing data in; program syz-executor4 not setting count and/or reply_len properly sg_write: data in/out 700410/58 bytes for SCSI command 0xe2-- guessing data in; program syz-executor3 not setting count and/or reply_len properly sg_write: data in/out 700410/2 bytes for SCSI command 0xe2-- guessing data in; program syz-executor4 not setting count and/or reply_len properly sg_write: data in/out 700410/58 bytes for SCSI command 0xe2-- guessing data in; program syz-executor3 not setting count and/or reply_len properly kauditd_printk_skb: 4 callbacks suppressed audit: type=1400 audit(1517706507.501:66): avc: denied { setgid } for pid=7355 comm="syz-executor6" capability=6 scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=cap_userns permissive=1