================================================================== BUG: KASAN: slab-out-of-bounds in put_unaligned_be32 include/linux/unaligned/access_ok.h:60 [inline] BUG: KASAN: slab-out-of-bounds in sha1_base_finish include/crypto/sha1_base.h:102 [inline] BUG: KASAN: slab-out-of-bounds in sha1_finup+0x44e/0x4b0 arch/x86/crypto/sha1_ssse3_glue.c:70 Write of size 4 at addr ffff88017d852e98 by task syz-executor2/24713 CPU: 0 PID: 24713 Comm: syz-executor2 Not tainted 4.18.0-rc1+ #17 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1c9/0x2b4 lib/dump_stack.c:113 print_address_description+0x6c/0x20b mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.7+0x242/0x2fe mm/kasan/report.c:412 __asan_report_store4_noabort+0x17/0x20 mm/kasan/report.c:437 put_unaligned_be32 include/linux/unaligned/access_ok.h:60 [inline] sha1_base_finish include/crypto/sha1_base.h:102 [inline] sha1_finup+0x44e/0x4b0 arch/x86/crypto/sha1_ssse3_glue.c:70 sha1_ssse3_finup arch/x86/crypto/sha1_ssse3_glue.c:86 [inline] sha1_ssse3_final+0x28/0x30 arch/x86/crypto/sha1_ssse3_glue.c:93 crypto_shash_final+0x104/0x260 crypto/shash.c:152 kdf_ctr security/keys/dh.c:186 [inline] keyctl_dh_compute_kdf security/keys/dh.c:217 [inline] __keyctl_dh_compute+0x1198/0x1be0 security/keys/dh.c:389 compat_keyctl_dh_compute+0x2d0/0x400 security/keys/compat_dh.c:39 __do_compat_sys_keyctl security/keys/compat.c:136 [inline] __se_compat_sys_keyctl security/keys/compat.c:59 [inline] __ia32_compat_sys_keyctl+0x137/0x3b0 security/keys/compat.c:59 do_syscall_32_irqs_on arch/x86/entry/common.c:326 [inline] do_fast_syscall_32+0x34d/0xfb2 arch/x86/entry/common.c:397 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 RIP: 0023:0xf7f90cb9 Code: 55 08 8b 88 64 cd ff ff 8b 98 68 cd ff ff 89 c8 85 d2 74 02 89 0a 5b 5d c3 8b 04 24 c3 8b 1c 24 c3 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90 RSP: 002b:00000000f5f8c0ac EFLAGS: 00000282 ORIG_RAX: 0000000000000120 RAX: ffffffffffffffda RBX: 0000000000000017 RCX: 0000000020000100 RDX: 0000000020a53ffb RSI: 0000000000000005 RDI: 0000000020000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000296 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 24713: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc4/0xe0 mm/kasan/kasan.c:553 __do_kmalloc mm/slab.c:3718 [inline] __kmalloc+0x14e/0x760 mm/slab.c:3727 kmalloc include/linux/slab.h:518 [inline] keyctl_dh_compute_kdf security/keys/dh.c:211 [inline] __keyctl_dh_compute+0x1000/0x1be0 security/keys/dh.c:389 compat_keyctl_dh_compute+0x2d0/0x400 security/keys/compat_dh.c:39 __do_compat_sys_keyctl security/keys/compat.c:136 [inline] __se_compat_sys_keyctl security/keys/compat.c:59 [inline] __ia32_compat_sys_keyctl+0x137/0x3b0 security/keys/compat.c:59 do_syscall_32_irqs_on arch/x86/entry/common.c:326 [inline] do_fast_syscall_32+0x34d/0xfb2 arch/x86/entry/common.c:397 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 Freed by task 23703: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x11a/0x170 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kfree+0xd9/0x260 mm/slab.c:3813 free_workqueue_attrs kernel/workqueue.c:3198 [inline] apply_wqattrs_cleanup+0x13c/0x170 kernel/workqueue.c:3700 apply_workqueue_attrs_locked+0x19a/0x250 kernel/workqueue.c:3835 apply_workqueue_attrs+0x30/0x50 kernel/workqueue.c:3862 alloc_and_link_pwqs kernel/workqueue.c:3978 [inline] __alloc_workqueue_key+0xabf/0x1190 kernel/workqueue.c:4091 tipc_topsrv_work_start net/tipc/topsrv.c:623 [inline] tipc_topsrv_start+0x699/0x10c0 net/tipc/topsrv.c:668 tipc_init_net+0x4d8/0x6d0 net/tipc/core.c:78 ops_init+0x101/0x560 net/core/net_namespace.c:128 setup_net+0x3d9/0x980 net/core/net_namespace.c:313 copy_net_ns+0x2b8/0x4d0 net/core/net_namespace.c:436 IPVS: ftp: loaded support on port[0] = 21 create_new_namespaces+0x6ad/0x900 kernel/nsproxy.c:107 unshare_nsproxy_namespaces+0xc3/0x1f0 kernel/nsproxy.c:206 ksys_unshare+0x723/0xfb0 kernel/fork.c:2419 __do_sys_unshare kernel/fork.c:2487 [inline] __se_sys_unshare kernel/fork.c:2485 [inline] __ia32_sys_unshare+0x30/0x40 kernel/fork.c:2485 do_syscall_32_irqs_on arch/x86/entry/common.c:326 [inline] do_fast_syscall_32+0x34d/0xfb2 arch/x86/entry/common.c:397 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139 The buggy address belongs to the object at ffff88017d852e80 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 24 bytes inside of 32-byte region [ffff88017d852e80, ffff88017d852ea0) The buggy address belongs to the page: page:ffffea0005f61480 count:1 mapcount:0 mapping:ffff8801da8001c0 index:0xffff88017d852fc1 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffffea0005f61248 ffffea0005fcd508 ffff8801da8001c0 raw: ffff88017d852fc1 ffff88017d852000 000000010000003f 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88017d852d80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff88017d852e00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc >ffff88017d852e80: 00 00 00 fc fc fc fc fc fb fb fb fb fc fc fc fc ^ ffff88017d852f00: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff88017d852f80: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================