================================================================== BUG: KASAN: use-after-free in __read_once_size include/linux/compiler.h:183 [inline] BUG: KASAN: use-after-free in atomic_read arch/x86/include/asm/atomic.h:27 [inline] BUG: KASAN: use-after-free in refcount_inc_not_zero+0xd3/0xe0 lib/refcount.c:120 Read of size 4 at addr ffff88809b678280 by task syz-executor.4/28884 CPU: 0 PID: 28884 Comm: syz-executor.4 Not tainted 4.14.112 #2 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+0x138/0x19c lib/dump_stack.c:53 print_address_description.cold+0x7c/0x1dc mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report mm/kasan/report.c:409 [inline] kasan_report.cold+0xaf/0x2b5 mm/kasan/report.c:393 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:429 __read_once_size include/linux/compiler.h:183 [inline] atomic_read arch/x86/include/asm/atomic.h:27 [inline] refcount_inc_not_zero+0xd3/0xe0 lib/refcount.c:120 refcount_inc+0x16/0x40 lib/refcount.c:153 sock_hold include/net/sock.h:619 [inline] nr_release+0x5e/0x390 net/netrom/af_netrom.c:523 __sock_release+0xd3/0x2c0 net/socket.c:602 sock_close+0x1b/0x30 net/socket.c:1139 __fput+0x277/0x7a0 fs/file_table.c:210 ____fput+0x16/0x20 fs/file_table.c:244 task_work_run+0x119/0x190 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x1da/0x220 arch/x86/entry/common.c:163 net_ratelimit: 18 callbacks suppressed protocol 88fb is buggy, dev hsr_slave_0 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:267 [inline] do_syscall_64+0x4a9/0x630 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x4129e1 RSP: 002b:00007fff717d8cb0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000006 RCX: 00000000004129e1 RDX: 0000000000000000 RSI: 0000000000001135 RDI: 0000000000000005 RBP: 000000000073c900 R08: 0000000035fdb135 R09: 0000000035fdb139 protocol 88fb is buggy, dev hsr_slave_1 R10: 00007fff717d8d80 R11: 0000000000000293 R12: 0000000000000001 R13: 000000000073c900 R14: 0000000000184b06 R15: 000000000073bf0c Allocated by task 28888: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x45/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc mm/kasan/kasan.c:551 [inline] kasan_kmalloc+0xce/0xf0 mm/kasan/kasan.c:529 __do_kmalloc mm/slab.c:3720 [inline] __kmalloc+0x15d/0x7a0 mm/slab.c:3729 kmalloc include/linux/slab.h:493 [inline] sk_prot_alloc+0x171/0x2a0 net/core/sock.c:1470 sk_alloc+0x39/0xd70 net/core/sock.c:1524 nr_create+0xa1/0x5d0 net/netrom/af_netrom.c:436 __sock_create+0x2fb/0x620 net/socket.c:1275 protocol 88fb is buggy, dev hsr_slave_1 sock_create net/socket.c:1315 [inline] SYSC_socket net/socket.c:1345 [inline] SyS_socket+0xd3/0x170 net/socket.c:1325 do_syscall_64+0x1eb/0x630 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 28884: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x45/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x75/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xcc/0x270 mm/slab.c:3815 sk_prot_free net/core/sock.c:1507 [inline] __sk_destruct+0x495/0x5d0 net/core/sock.c:1586 protocol 88fb is buggy, dev hsr_slave_0 sk_destruct+0x67/0x80 net/core/sock.c:1594 __sk_free+0x54/0x230 net/core/sock.c:1602 sk_free+0x35/0x40 net/core/sock.c:1613 sock_put include/net/sock.h:1653 [inline] nr_release+0x30e/0x390 net/netrom/af_netrom.c:557 __sock_release+0xd3/0x2c0 net/socket.c:602 sock_close+0x1b/0x30 net/socket.c:1139 __fput+0x277/0x7a0 fs/file_table.c:210 ____fput+0x16/0x20 fs/file_table.c:244 task_work_run+0x119/0x190 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x1da/0x220 arch/x86/entry/common.c:163 protocol 88fb is buggy, dev hsr_slave_1 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:267 [inline] do_syscall_64+0x4a9/0x630 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x42/0xb7 The buggy address belongs to the object at ffff88809b678200 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 128 bytes inside of 2048-byte region [ffff88809b678200, ffff88809b678a00) The buggy address belongs to the page: page:ffffea00026d9e00 count:1 mapcount:0 mapping:ffff88809b678200 index:0x0 compound_mapcount: 0 flags: 0x1fffc0000008100(slab|head) raw: 01fffc0000008100 ffff88809b678200 0000000000000000 0000000100000003 raw: ffffea0001adc5a0 ffffea0001ccef20 ffff8880aa800c40 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809b678180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88809b678200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88809b678280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88809b678300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809b678380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== kauditd_printk_skb: 682 callbacks suppressed audit: type=1400 audit(1555530608.606:19056): avc: denied { map } for pid=28947 comm="modprobe" path="/etc/ld.so.cache" dev="sda1" ino=2251 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies. Check SNMP counters. protocol 88fb is buggy, dev hsr_slave_0 protocol 88fb is buggy, dev hsr_slave_1 audit: type=1400 audit(1555530608.676:19057): avc: denied { map } for pid=28947 comm="modprobe" path="/lib/x86_64-linux-gnu/libkmod.so.2.1.3" dev="sda1" ino=2811 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: audit_backlog=65 > audit_backlog_limit=64 audit: audit_backlog=65 > audit_backlog_limit=64 audit: audit_backlog=65 > audit_backlog_limit=64 audit: audit_backlog=65 > audit_backlog_limit=64 audit: type=1400 audit(1555530608.676:19058): avc: denied { map } for pid=28947 comm="modprobe" path="/lib/x86_64-linux-gnu/libkmod.so.2.1.3" dev="sda1" ino=2811 scontext=system_u:system_r:kernel_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 audit: audit_lost=735 audit_rate_limit=0 audit_backlog_limit=64 audit: audit_lost=736 audit_rate_limit=0 audit_backlog_limit=64 audit: audit_lost=737 audit_rate_limit=0 audit_backlog_limit=64 protocol 88fb is buggy, dev hsr_slave_0 protocol 88fb is buggy, dev hsr_slave_1 protocol 88fb is buggy, dev hsr_slave_0 refcount_t: increment on 0; use-after-free. ------------[ cut here ]------------ WARNING: CPU: 0 PID: 28946 at lib/refcount.c:153 refcount_inc lib/refcount.c:153 [inline] WARNING: CPU: 0 PID: 28946 at lib/refcount.c:153 refcount_inc.cold+0x18/0x1f lib/refcount.c:151