================================================================== BUG: KASAN: slab-out-of-bounds in md5_block+0x95/0x8d0 lib/crypto/md5.c:40 Read of size 64 at addr ffff888036a9b4e0 by task syz.5.994/9500 CPU: 1 UID: 0 PID: 9500 Comm: syz.5.994 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x13d/0x4b0 mm/kasan/report.c:482 kasan_report+0xdf/0x1c0 mm/kasan/report.c:595 check_region_inline mm/kasan/generic.c:186 [inline] kasan_check_range+0x10f/0x1e0 mm/kasan/generic.c:200 __asan_memcpy+0x23/0x60 mm/kasan/shadow.c:105 md5_block+0x95/0x8d0 lib/crypto/md5.c:40 md5_blocks lib/crypto/md5.c:126 [inline] md5_update+0xf7/0x210 lib/crypto/md5.c:161 md5+0xc7/0x120 lib/crypto/md5.c:202 ecryptfs_write_tag_70_packet+0x880/0x1410 fs/ecryptfs/keystore.c:741 ecryptfs_encrypt_filename fs/ecryptfs/crypto.c:1378 [inline] ecryptfs_encrypt_and_encode_filename+0x428/0xa60 fs/ecryptfs/crypto.c:1789 ecryptfs_lookup+0x1f7/0x830 fs/ecryptfs/inode.c:402 lookup_open+0xa79/0x1990 fs/namei.c:4528 open_last_lookups fs/namei.c:4767 [inline] path_openat+0xa2c/0x2440 fs/namei.c:4997 do_file_open+0x20e/0x430 fs/namei.c:5029 do_sys_openat2+0x10f/0x1e0 fs/open.c:1417 do_sys_open fs/open.c:1423 [inline] __do_sys_openat fs/open.c:1439 [inline] __se_sys_openat fs/open.c:1434 [inline] __x64_sys_openat+0x12d/0x210 fs/open.c:1434 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f7bea99e159 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f7beb7bc028 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007f7beac25fa0 RCX: 00007f7bea99e159 RDX: 0000000000800400 RSI: 0000200000000100 RDI: 0000000000000005 RBP: 00007f7beaa3506b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000010 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f7beac26038 R14: 00007f7beac25fa0 R15: 00007ffd2b3de438 Allocated by task 6221: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 poison_kmalloc_redzone mm/kasan/common.c:409 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:426 kasan_kmalloc include/linux/kasan.h:263 [inline] __do_kmalloc_node mm/slub.c:5414 [inline] __kmalloc_flags_noprof+0x370/0x8e0 mm/slub.c:5602 _kmalloc_flags_noprof mm/slab.h:55 [inline] __alloc_empty_sheaf mm/slub.c:2822 [inline] alloc_empty_sheaf mm/slub.c:2842 [inline] __pcs_replace_empty_main+0x3fa/0x650 mm/slub.c:4769 alloc_from_pcs mm/slub.c:4850 [inline] slab_alloc_node mm/slub.c:4984 [inline] __do_kmalloc_node mm/slub.c:5413 [inline] __kvmalloc_node_noprof+0x7bb/0x9b0 mm/slub.c:7014 drm_property_create_blob+0x79/0x340 drivers/gpu/drm/drm_property.c:565 drm_atomic_helper_dirtyfb+0x319/0x790 drivers/gpu/drm/drm_damage_helper.c:150 drm_fbdev_shmem_helper_fb_dirty+0x1cc/0x350 drivers/gpu/drm/drm_fbdev_shmem.c:117 drm_fb_helper_fb_dirty drivers/gpu/drm/drm_fb_helper.c:339 [inline] drm_fb_helper_damage_work+0x4c8/0xab0 drivers/gpu/drm/drm_fb_helper.c:365 process_one_work+0xac7/0x1b10 kernel/workqueue.c:3396 process_scheduled_works kernel/workqueue.c:3479 [inline] worker_thread+0x5ef/0xe50 kernel/workqueue.c:3560 kthread+0x373/0x450 kernel/kthread.c:436 ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Last potentially related work creation: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_record_aux_stack+0xa7/0xc0 mm/kasan/generic.c:556 __call_rcu_common.constprop.0+0xa5/0x9b0 kernel/rcu/tree.c:3181 __kfree_rcu_sheaf+0x36f/0x870 mm/slub.c:6212 kfree_rcu_sheaf mm/slab_common.c:1680 [inline] kvfree_call_rcu+0x1c0/0x4f0 mm/slab_common.c:2035 drop_sysctl_table+0x355/0x5f0 fs/proc/proc_sysctl.c:1520 unregister_sysctl_table fs/proc/proc_sysctl.c:1541 [inline] unregister_sysctl_table+0x41/0x60 fs/proc/proc_sysctl.c:1533 mpls_dev_sysctl_unregister net/mpls/af_mpls.c:1477 [inline] mpls_dev_notify+0x6b3/0x920 net/mpls/af_mpls.c:1695 notifier_call_chain+0x99/0x3f0 kernel/notifier.c:85 call_netdevice_notifiers_info+0xbe/0x110 net/core/dev.c:2275 call_netdevice_notifiers_extack net/core/dev.c:2313 [inline] call_netdevice_notifiers net/core/dev.c:2327 [inline] unregister_netdevice_many_notify+0x1149/0x2150 net/core/dev.c:12529 unregister_netdevice_many net/core/dev.c:12600 [inline] default_device_exit_batch+0x6c6/0x890 net/core/dev.c:13312 ops_exit_list net/core/net_namespace.c:206 [inline] ops_undo_list+0x363/0xab0 net/core/net_namespace.c:253 cleanup_net+0x499/0x920 net/core/net_namespace.c:706 process_one_work+0xac7/0x1b10 kernel/workqueue.c:3396 process_scheduled_works kernel/workqueue.c:3479 [inline] worker_thread+0x5ef/0xe50 kernel/workqueue.c:3560 kthread+0x373/0x450 kernel/kthread.c:436 ret_from_fork+0x730/0xd60 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 The buggy address belongs to the object at ffff888036a9b400 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 224 bytes inside of allocated 256-byte region [ffff888036a9b400, ffff888036a9b500) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x36a9a head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801c042b40 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801c042b40 dead000000000100 dead000000000122 head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000001 ffffffffffffff81 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0xd2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5954, tgid 5954 (syz-executor), ts 40940433018 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1871 prep_new_page mm/page_alloc.c:1879 [inline] get_page_from_freelist+0x110d/0x35d0 mm/page_alloc.c:3943 __alloc_frozen_pages_noprof+0x2eb/0x3300 mm/page_alloc.c:5436 alloc_slab_page mm/slub.c:3347 [inline] allocate_slab mm/slub.c:3462 [inline] new_slab+0xa9/0x6e0 mm/slub.c:3513 refill_objects+0xe3/0x410 mm/slub.c:7417 refill_sheaf mm/slub.c:2885 [inline] __pcs_replace_empty_main+0x35e/0x650 mm/slub.c:4774 alloc_from_pcs mm/slub.c:4850 [inline] slab_alloc_node mm/slub.c:4984 [inline] __do_kmalloc_node mm/slub.c:5413 [inline] __kmalloc_noprof+0x67c/0x840 mm/slub.c:5439 _kmalloc_noprof include/linux/slab.h:995 [inline] _kmalloc_array_noprof include/linux/slab.h:1211 [inline] security_inode_init_security+0x113/0x370 security/security.c:1347 shmem_symlink+0x163/0xbf0 mm/shmem.c:4071 vfs_symlink fs/namei.c:5794 [inline] vfs_symlink+0x178/0x4d0 fs/namei.c:5773 filename_symlinkat+0x2a6/0x560 fs/namei.c:5819 __do_sys_symlinkat fs/namei.c:5839 [inline] __se_sys_symlinkat fs/namei.c:5834 [inline] __x64_sys_symlinkat+0x9c/0xe0 fs/namei.c:5834 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x790 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5731 tgid 5731 ts 39236740323 stack trace: reset_page_owner include/linux/page_owner.h:26 [inline] __free_pages_prepare mm/page_alloc.c:1418 [inline] __free_frozen_pages+0x79f/0x10f0 mm/page_alloc.c:2962 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x47/0xf0 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x1a0/0x1f0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:361 kasan_slab_alloc include/linux/kasan.h:253 [inline] slab_post_alloc_hook mm/slub.c:4683 [inline] slab_alloc_node mm/slub.c:4996 [inline] __do_kmalloc_node mm/slub.c:5413 [inline] __kvmalloc_node_noprof+0x2f6/0x9b0 mm/slub.c:7014 fib_info_hash_alloc net/ipv4/fib_semantics.c:367 [inline] fib_info_hash_grow net/ipv4/fib_semantics.c:384 [inline] fib_create_info+0xccd/0x4640 net/ipv4/fib_semantics.c:1427 fib_table_insert+0x169/0x1c70 net/ipv4/fib_trie.c:1212 fib_magic+0x4d4/0x5c0 net/ipv4/fib_frontend.c:1147 fib_add_ifaddr+0x16d/0x560 net/ipv4/fib_frontend.c:1169 fib_inetaddr_event+0x147/0x270 net/ipv4/fib_frontend.c:1483 notifier_call_chain+0x99/0x3f0 kernel/notifier.c:85 blocking_notifier_call_chain kernel/notifier.c:380 [inline] blocking_notifier_call_chain+0x69/0xa0 kernel/notifier.c:368 __inet_insert_ifa+0x91d/0xc70 net/ipv4/devinet.c:566 inet_rtm_newaddr+0xeb1/0x18c0 net/ipv4/devinet.c:1001 rtnetlink_rcv_msg+0x95e/0xe90 net/core/rtnetlink.c:7137 netlink_rcv_skb+0x159/0x420 net/netlink/af_netlink.c:2575 Memory state around the buggy address: ffff888036a9b400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff888036a9b480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff888036a9b500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888036a9b580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888036a9b600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================