ffffffff8165e557 000000000000122c ffff8801d911a118 ffff8801d911a0a0 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 ================================================================== BUG: KASAN: slab-out-of-bounds in __lock_acquire+0x2eff/0x3640 kernel/locking/lockdep.c:3224 at addr ffff8801d0813ff8 Read of size 8 by task syz-executor7/7953 [] handle_userfault+0xa37/0x1300 fs/userfaultfd.c:323 [] do_anonymous_page mm/memory.c:2747 [inline] [] handle_pte_fault mm/memory.c:3488 [inline] [] __handle_mm_fault mm/memory.c:3577 [inline] [] handle_mm_fault+0x1fd1/0x2530 mm/memory.c:3614 [] __do_page_fault+0x5c2/0xd40 arch/x86/mm/fault.c:1406 [] do_page_fault+0x27/0x30 arch/x86/mm/fault.c:1469 [] page_fault+0x28/0x30 arch/x86/entry/entry_64.S:1012 [] do_ip_setsockopt.isra.12+0x1977/0x2960 net/ipv4/ip_sockglue.c:1151 [] compat_ip_setsockopt+0x4f/0xf0 net/ipv4/ip_sockglue.c:1269 [] inet_csk_compat_setsockopt+0x95/0x120 net/ipv4/inet_connection_sock.c:914 [] compat_tcp_setsockopt+0x3d/0x70 net/ipv4/tcp.c:2747 [] compat_sock_common_setsockopt+0xb2/0x140 net/core/sock.c:2717 [] C_SYSC_setsockopt net/compat.c:398 [inline] [] compat_SyS_setsockopt+0x149/0x290 net/compat.c:381 [] do_syscall_32_irqs_on arch/x86/entry/common.c:322 [inline] [] do_fast_syscall_32+0x2f7/0x890 arch/x86/entry/common.c:384 [] entry_SYSENTER_compat+0x51/0x60 arch/x86/entry/entry_64_compat.S:124 CPU: 1 PID: 7953 Comm: syz-executor7 Not tainted 4.9.69-g3f1d77c #4 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801d6e872f0 ffffffff81d90a29 ffff8801d743eb40 ffff8801d0813f80 ffff8801d0813fe0 ffffed003a1027ff ffff8801d0813ff8 ffff8801d6e87318 ffffffff8153a45c ffffed003a1027ff ffff8801d743eb40 0000000000000000 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] kasan_object_err+0x1c/0x70 mm/kasan/report.c:160 [] print_address_description mm/kasan/report.c:198 [inline] [] kasan_report_error mm/kasan/report.c:287 [inline] [] kasan_report.part.1+0x21c/0x500 mm/kasan/report.c:309 [] kasan_report mm/kasan/report.c:330 [inline] [] __asan_report_load8_noabort+0x29/0x30 mm/kasan/report.c:330 [] __lock_acquire+0x2eff/0x3640 kernel/locking/lockdep.c:3224 [] lock_acquire+0x12e/0x410 kernel/locking/lockdep.c:3756 [] __raw_write_lock_irqsave include/linux/rwlock_api_smp.h:186 [inline] [] _raw_write_lock_irqsave+0x4e/0x62 kernel/locking/spinlock.c:303 [] sg_remove_request+0x70/0x120 drivers/scsi/sg.c:2122 [] sg_finish_rem_req+0x295/0x340 drivers/scsi/sg.c:1838 [] sg_read+0xa1c/0x1440 drivers/scsi/sg.c:527 [] do_loop_readv_writev.part.17+0x141/0x1e0 fs/read_write.c:714 [] do_loop_readv_writev fs/read_write.c:880 [inline] [] do_readv_writev+0x520/0x750 fs/read_write.c:874 [] vfs_readv+0x84/0xc0 fs/read_write.c:898 [] kernel_readv fs/splice.c:363 [inline] [] default_file_splice_read+0x43f/0x7a0 fs/splice.c:435 [] do_splice_to+0x10a/0x160 fs/splice.c:899 [] do_splice fs/splice.c:1192 [inline] [] SYSC_splice fs/splice.c:1416 [inline] [] SyS_splice+0xf5f/0x1520 fs/splice.c:1399 [] do_syscall_32_irqs_on arch/x86/entry/common.c:322 [inline] [] do_fast_syscall_32+0x2f7/0x890 arch/x86/entry/common.c:384 [] entry_SYSENTER_compat+0x51/0x60 arch/x86/entry/entry_64_compat.S:124 Object at ffff8801d0813f80, in cache fasync_cache size: 96 Allocated: PID = 7953 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:495 set_track mm/kasan/kasan.c:507 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:598 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:537 slab_post_alloc_hook mm/slab.h:417 [inline] slab_alloc_node mm/slub.c:2715 [inline] slab_alloc mm/slub.c:2723 [inline] kmem_cache_alloc+0xba/0x290 mm/slub.c:2728 fasync_alloc fs/fcntl.c:604 [inline] fasync_add_entry fs/fcntl.c:662 [inline] fasync_helper+0x37/0xb0 fs/fcntl.c:691 sg_fasync+0x86/0xb0 drivers/scsi/sg.c:1203 ioctl_fioasync fs/ioctl.c:534 [inline] do_vfs_ioctl+0x2d8/0x1140 fs/ioctl.c:639 C_SYSC_ioctl fs/compat_ioctl.c:1624 [inline] compat_SyS_ioctl+0x4da/0x2050 fs/compat_ioctl.c:1549 do_syscall_32_irqs_on arch/x86/entry/common.c:322 [inline] do_fast_syscall_32+0x2f7/0x890 arch/x86/entry/common.c:384 entry_SYSENTER_compat+0x51/0x60 arch/x86/entry/entry_64_compat.S:124 Freed: PID = 2864 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57 save_stack+0x43/0xd0 mm/kasan/kasan.c:495 set_track mm/kasan/kasan.c:507 [inline] kasan_slab_free+0x73/0xc0 mm/kasan/kasan.c:571 slab_free_hook mm/slub.c:1355 [inline] slab_free_freelist_hook mm/slub.c:1377 [inline] slab_free mm/slub.c:2958 [inline] kmem_cache_free+0xb2/0x2e0 mm/slub.c:2980 fasync_free+0x1c/0x20 fs/fcntl.c:614 do_fcntl_add_lease fs/locks.c:1899 [inline] fcntl_setlease+0x168/0x220 fs/locks.c:1917 do_fcntl fs/fcntl.c:325 [inline] SYSC_fcntl fs/fcntl.c:372 [inline] SyS_fcntl+0x6e6/0xc70 fs/fcntl.c:357 C_SYSC_fcntl64 fs/compat.c:469 [inline] compat_SyS_fcntl64+0xce/0x4f0 fs/compat.c:403 do_syscall_32_irqs_on arch/x86/entry/common.c:322 [inline] do_fast_syscall_32+0x2f7/0x890 arch/x86/entry/common.c:384 entry_SYSENTER_compat+0x51/0x60 arch/x86/entry/entry_64_compat.S:124 Memory state around the buggy address: ffff8801d0813e80: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ffff8801d0813f00: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc >ffff8801d0813f80: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc ^ ffff8801d0814000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8801d0814080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] PREEMPT SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 1 PID: 7953 Comm: syz-executor7 Tainted: G B 4.9.69-g3f1d77c #4 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff8801cf680000 task.stack: ffff8801d6e80000 RIP: 0010:[] [] __lock_acquire+0x194/0x3640 kernel/locking/lockdep.c:3234 RSP: 0018:ffff8801d6e873c0 EFLAGS: 00010086 RAX: dead4ead00000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 1ffff1003a102800 RSI: 0000000000000000 RDI: ffff8801d0814000 RBP: ffff8801d6e87580 R08: 0000000000000001 R09: 0000000000000001 R10: 0000000000000000 R11: ffff8801cf680000 R12: 0000000000000001 R13: 0000000000000001 R14: 0000000000000000 R15: ffff8801d0813ff8 FS: 0000000000000000(0000) GS:ffff8801db300000(0063) knlGS:00000000f7726b40 CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033 CR2: 0000000020fd6000 CR3: 00000001ca29b000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Stack: 00000000024000c0 ffff8801d1d19aa8 ffff8801da0018c0 ffff8801d6e87608 ffffffff815397a3 000000400000000d ffff8801d6e87400 ffffffff00000000 ffffffff8107c576 ffffffff81539743 ffffffff815399cd ffffffff81535a8b Call Trace: [] lock_acquire+0x12e/0x410 kernel/locking/lockdep.c:3756 [] __raw_write_lock_irqsave include/linux/rwlock_api_smp.h:186 [inline] [] _raw_write_lock_irqsave+0x4e/0x62 kernel/locking/spinlock.c:303 [] sg_remove_request+0x70/0x120 drivers/scsi/sg.c:2122 [] sg_finish_rem_req+0x295/0x340 drivers/scsi/sg.c:1838 [] sg_read+0xa1c/0x1440 drivers/scsi/sg.c:527 [] do_loop_readv_writev.part.17+0x141/0x1e0 fs/read_write.c:714 [] do_loop_readv_writev fs/read_write.c:880 [inline] [] do_readv_writev+0x520/0x750 fs/read_write.c:874 [] vfs_readv+0x84/0xc0 fs/read_write.c:898 [] kernel_readv fs/splice.c:363 [inline] [] default_file_splice_read+0x43f/0x7a0 fs/splice.c:435 [] do_splice_to+0x10a/0x160 fs/splice.c:899 [] do_splice fs/splice.c:1192 [inline] [] SYSC_splice fs/splice.c:1416 [inline] [] SyS_splice+0xf5f/0x1520 fs/splice.c:1399 [] do_syscall_32_irqs_on arch/x86/entry/common.c:322 [inline] [] do_fast_syscall_32+0x2f7/0x890 arch/x86/entry/common.c:384 [] entry_SYSENTER_compat+0x51/0x60 arch/x86/entry/entry_64_compat.S:124 Code: 9e ff ff 44 8b 94 24 98 00 00 00 48 85 c0 8b 8c 24 90 00 00 00 44 8b 8c 24 88 00 00 00 4c 8b 9c 24 80 00 00 00 0f 84 ff 07 00 00 ff 80 98 01 00 00 49 8d b3 a8 08 00 00 48 ba 00 00 00 00 00 RIP [] __lock_acquire+0x194/0x3640 kernel/locking/lockdep.c:3234 RSP ---[ end trace 406d2160a0ce9044 ]---