"syz-executor.2" (1925) uses obsolete ecb(arc4) skcipher ================================================================== BUG: KASAN: slab-out-of-bounds in arc4_crypt+0x31c/0x4e0 lib/crypto/arc4.c:46 Read of size 4 at addr ffff888038c846e0 by task syz-executor.2/1925 CPU: 1 PID: 1925 Comm: syz-executor.2 Not tainted 6.7.0-rc6-next-20231222-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc3/0x620 mm/kasan/report.c:488 kasan_report+0xd9/0x110 mm/kasan/report.c:601 arc4_crypt+0x31c/0x4e0 lib/crypto/arc4.c:46 crypto_arc4_crypt+0x61/0x70 crypto/arc4.c:37 crypto_lskcipher_crypt_sg+0x28c/0x460 crypto/lskcipher.c:229 crypto_skcipher_decrypt+0xda/0x160 crypto/skcipher.c:693 _skcipher_recvmsg crypto/algif_skcipher.c:199 [inline] skcipher_recvmsg+0xc2b/0x1040 crypto/algif_skcipher.c:221 sock_recvmsg_nosec net/socket.c:1044 [inline] sock_recvmsg+0xe2/0x170 net/socket.c:1066 ____sys_recvmsg+0x21f/0x5c0 net/socket.c:2801 ___sys_recvmsg+0x115/0x1a0 net/socket.c:2843 do_recvmmsg+0x2af/0x740 net/socket.c:2937 __sys_recvmmsg net/socket.c:3016 [inline] __do_sys_recvmmsg net/socket.c:3039 [inline] __se_sys_recvmmsg net/socket.c:3032 [inline] __x64_sys_recvmmsg+0x235/0x290 net/socket.c:3032 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0x40/0x110 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x62/0x6a RIP: 0033:0x7f7f9187cce9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f7f925dc0c8 EFLAGS: 00000246 ORIG_RAX: 000000000000012b RAX: ffffffffffffffda RBX: 00007f7f9199bf80 RCX: 00007f7f9187cce9 RDX: 0000000000000001 RSI: 0000000020001cc0 RDI: 0000000000000004 RBP: 00007f7f918c947a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f7f9199bf80 R15: 00007ffe703048f8 Allocated by task 91: kasan_save_stack+0x33/0x50 mm/kasan/common.c:47 kasan_set_track+0x24/0x30 mm/kasan/common.c:61 unpoison_slab_object mm/kasan/common.c:282 [inline] __kasan_slab_alloc+0x81/0x90 mm/kasan/common.c:308 kasan_slab_alloc include/linux/kasan.h:200 [inline] slab_post_alloc_hook mm/slub.c:3817 [inline] slab_alloc_node mm/slub.c:3864 [inline] kmem_cache_alloc+0x136/0x320 mm/slub.c:3871 kmem_cache_zalloc include/linux/slab.h:701 [inline] __kernfs_new_node+0xd3/0x890 fs/kernfs/dir.c:615 kernfs_new_node+0x18c/0x240 fs/kernfs/dir.c:691 __kernfs_create_file+0x53/0x340 fs/kernfs/file.c:1025 sysfs_add_file_mode_ns+0x1ff/0x3b0 fs/sysfs/file.c:307 sysfs_create_file_ns+0x13e/0x1d0 fs/sysfs/file.c:368 sysfs_create_file include/linux/sysfs.h:625 [inline] bus_create_file drivers/base/bus.c:187 [inline] add_probe_files drivers/base/bus.c:615 [inline] bus_register+0x47b/0x6a0 drivers/base/bus.c:895 mmc_init+0xf/0x80 drivers/mmc/core/core.c:2334 do_one_initcall+0x128/0x680 init/main.c:1237 do_initcall_level init/main.c:1299 [inline] do_initcalls init/main.c:1315 [inline] do_basic_setup init/main.c:1334 [inline] kernel_init_freeable+0x692/0xc30 init/main.c:1554 kernel_init+0x1c/0x2a0 init/main.c:1444 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 Last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:47 kasan_set_track+0x24/0x30 mm/kasan/common.c:61 unpoison_slab_object mm/kasan/common.c:282 [inline] __kasan_slab_alloc+0x81/0x90 mm/kasan/common.c:308 kasan_slab_alloc include/linux/kasan.h:200 [inline] slab_post_alloc_hook mm/slub.c:3817 [inline] slab_alloc_node mm/slub.c:3864 [inline] kmem_cache_alloc+0x136/0x320 mm/slub.c:3871 kmem_cache_zalloc include/linux/slab.h:701 [inline] __proc_create+0x2c3/0x8b0 fs/proc/generic.c:425 proc_create_reg+0x7d/0x170 fs/proc/generic.c:552 proc_create_single_data+0x87/0x130 fs/proc/generic.c:652 proc_uptime_init+0x27/0x70 fs/proc/uptime.c:45 do_one_initcall+0x128/0x680 init/main.c:1237 do_initcall_level init/main.c:1299 [inline] do_initcalls init/main.c:1315 [inline] do_basic_setup init/main.c:1334 [inline] kernel_init_freeable+0x692/0xc30 init/main.c:1554 kernel_init+0x1c/0x2a0 init/main.c:1444 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 Second to last potentially related work creation: kasan_save_stack+0x33/0x50 mm/kasan/common.c:47 kasan_set_track+0x24/0x30 mm/kasan/common.c:61 unpoison_slab_object mm/kasan/common.c:282 [inline] __kasan_slab_alloc+0x81/0x90 mm/kasan/common.c:308 kasan_slab_alloc include/linux/kasan.h:200 [inline] slab_post_alloc_hook mm/slub.c:3817 [inline] slab_alloc_node mm/slub.c:3864 [inline] kmem_cache_alloc_node+0x177/0x340 mm/slub.c:3907 alloc_vmap_area+0x1af/0x2080 mm/vmalloc.c:1603 __get_vm_area_node+0x132/0x3d0 mm/vmalloc.c:2595 __vmalloc_node_range+0x279/0x1530 mm/vmalloc.c:3280 alloc_thread_stack_node kernel/fork.c:307 [inline] dup_task_struct kernel/fork.c:1112 [inline] copy_process+0x14fe/0x9770 kernel/fork.c:2326 kernel_clone+0xfd/0x940 kernel/fork.c:2901 user_mode_thread+0xb4/0xf0 kernel/fork.c:2979 rest_init+0x27/0x2b0 init/main.c:696 arch_call_rest_init+0x13/0x30 init/main.c:828 start_kernel+0x39e/0x480 init/main.c:1073 x86_64_start_reservations+0x18/0x30 arch/x86/kernel/head64.c:555 x86_64_start_kernel+0xb2/0xc0 arch/x86/kernel/head64.c:536 secondary_startup_64_no_verify+0x170/0x17b The buggy address belongs to the object at ffff888038c84000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 1024 bytes to the right of allocated 736-byte region [ffff888038c84000, ffff888038c842e0) The buggy address belongs to the physical page: page:ffffea0000e32000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x38c80 head:ffffea0000e32000 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888013041dc0 ffffea0001c31000 dead000000000002 raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 5096, tgid 5096 (syz-executor.4), ts 177434768333, free_ts 0 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2d0/0x350 mm/page_alloc.c:1533 prep_new_page mm/page_alloc.c:1540 [inline] get_page_from_freelist+0xa19/0x3740 mm/page_alloc.c:3348 __alloc_pages+0x22e/0x2410 mm/page_alloc.c:4604 alloc_pages_mpol+0x258/0x5f0 mm/mempolicy.c:2133 alloc_slab_page mm/slub.c:2191 [inline] allocate_slab mm/slub.c:2358 [inline] new_slab+0x283/0x3c0 mm/slub.c:2411 ___slab_alloc+0x4ab/0x1990 mm/slub.c:3544 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3629 __slab_alloc_node mm/slub.c:3682 [inline] slab_alloc_node mm/slub.c:3854 [inline] kmalloc_trace+0x2ff/0x330 mm/slub.c:4011 kmalloc include/linux/slab.h:590 [inline] kzalloc include/linux/slab.h:711 [inline] batadv_hardif_add_interface net/batman-adv/hard-interface.c:882 [inline] batadv_hard_if_event+0xbca/0x1670 net/batman-adv/hard-interface.c:970 notifier_call_chain+0xb6/0x3d0 kernel/notifier.c:93 call_netdevice_notifiers_info+0xbe/0x130 net/core/dev.c:1966 call_netdevice_notifiers_extack net/core/dev.c:2004 [inline] call_netdevice_notifiers net/core/dev.c:2018 [inline] register_netdevice+0x16e2/0x1da0 net/core/dev.c:10294 veth_newlink+0x363/0xa10 drivers/net/veth.c:1915 rtnl_newlink_create net/core/rtnetlink.c:3515 [inline] __rtnl_newlink+0x118a/0x1940 net/core/rtnetlink.c:3735 rtnl_newlink+0x67/0xa0 net/core/rtnetlink.c:3748 rtnetlink_rcv_msg+0x3c7/0xe00 net/core/rtnetlink.c:6615 page_owner free stack trace missing Memory state around the buggy address: ffff888038c84580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888038c84600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888038c84680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888038c84700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888038c84780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================