"syz-executor.2" (17382) 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 ffff88807b9836e0 by task syz-executor.2/17382 CPU: 0 PID: 17382 Comm: syz-executor.2 Not tainted 6.7.0-rc6-next-20231221-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_encrypt+0xda/0x160 crypto/skcipher.c:669 _skcipher_recvmsg crypto/algif_skcipher.c:198 [inline] skcipher_recvmsg+0xb36/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:0x7f8bb427cce9 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:00007f8bb50070c8 EFLAGS: 00000246 ORIG_RAX: 000000000000012b RAX: ffffffffffffffda RBX: 00007f8bb439bf80 RCX: 00007f8bb427cce9 RDX: 0000000000000002 RSI: 0000000020000a40 RDI: 0000000000000004 RBP: 00007f8bb42c947a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f8bb439bf80 R15: 00007ffd229546c8 Allocated by task 32: kasan_save_stack+0x33/0x50 mm/kasan/common.c:47 kasan_set_track+0x24/0x30 mm/kasan/common.c:61 poison_kmalloc_redzone mm/kasan/common.c:340 [inline] __kasan_kmalloc+0xa2/0xb0 mm/kasan/common.c:357 kmalloc include/linux/slab.h:590 [inline] kzalloc include/linux/slab.h:711 [inline] alloc_workqueue_attrs kernel/workqueue.c:3732 [inline] alloc_workqueue+0x1d4/0x1480 kernel/workqueue.c:4689 acpi_os_initialize1+0x51/0xb0 drivers/acpi/osl.c:1669 acpi_bus_init drivers/acpi/bus.c:1319 [inline] acpi_init+0x11e/0xb70 drivers/acpi/bus.c:1430 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 poison_kmalloc_redzone mm/kasan/common.c:340 [inline] __kasan_kmalloc+0xa2/0xb0 mm/kasan/common.c:357 kasan_kmalloc include/linux/kasan.h:210 [inline] __do_kmalloc_node mm/slub.c:3985 [inline] __kmalloc_node_track_caller+0x220/0x470 mm/slub.c:4005 kmemdup+0x29/0x60 mm/util.c:131 kmemdup include/linux/fortify-string.h:761 [inline] neigh_parms_alloc+0x82/0x5d0 net/core/neighbour.c:1716 inetdev_init+0x135/0x580 net/ipv4/devinet.c:276 inetdev_event+0x1191/0x19a0 net/ipv4/devinet.c:1555 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:10291 register_vlan_dev+0x36e/0x940 net/8021q/vlan.c:179 vlan_newlink+0x40f/0x6a0 net/8021q/vlan_netlink.c:191 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 netlink_rcv_skb+0x16b/0x440 net/netlink/af_netlink.c:2543 netlink_unicast_kernel net/netlink/af_netlink.c:1341 [inline] netlink_unicast+0x53b/0x810 net/netlink/af_netlink.c:1367 netlink_sendmsg+0x8b4/0xd70 net/netlink/af_netlink.c:1908 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0xd5/0x180 net/socket.c:745 __sys_sendto+0x225/0x310 net/socket.c:2189 __do_sys_sendto net/socket.c:2201 [inline] __se_sys_sendto net/socket.c:2197 [inline] __x64_sys_sendto+0xe0/0x1b0 net/socket.c:2197 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 Second to last potentially related work creation: 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] kmem_cache_alloc+0x2e9/0x320 mm/slub.c:3871 alloc_pid+0xd4/0xd90 kernel/pid.c:183 copy_process+0x647e/0x9770 kernel/fork.c:2512 kernel_clone+0xfd/0x940 kernel/fork.c:2901 kernel_thread+0xc0/0x100 kernel/fork.c:2963 create_kthread kernel/kthread.c:411 [inline] kthreadd+0x4ef/0x7d0 kernel/kthread.c:764 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 The buggy address belongs to the object at ffff88807b983000 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 [ffff88807b983000, ffff88807b9832e0) The buggy address belongs to the physical page: page:ffffea0001ee6000 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7b980 head:ffffea0001ee6000 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 anon flags: 0xfff00000000840(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000840 ffff888013041dc0 0000000000000000 dead000000000001 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 0x1d2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 5056, tgid 5056 (kworker/0:3), ts 191803796877, free_ts 191783632623 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] __do_kmalloc_node mm/slub.c:3984 [inline] __kmalloc_node_track_caller+0x367/0x470 mm/slub.c:4005 kmalloc_reserve+0xef/0x260 net/core/skbuff.c:582 __alloc_skb+0x12b/0x330 net/core/skbuff.c:651 alloc_skb include/linux/skbuff.h:1298 [inline] nlmsg_new include/net/netlink.h:1010 [inline] inet6_rt_notify+0xf0/0x2b0 net/ipv6/route.c:6171 fib6_add_rt2node net/ipv6/ip6_fib.c:1257 [inline] fib6_add+0x2506/0x47d0 net/ipv6/ip6_fib.c:1483 __ip6_ins_rt net/ipv6/route.c:1303 [inline] ip6_ins_rt+0xb6/0x110 net/ipv6/route.c:1313 __ipv6_ifa_notify+0xcb1/0x10a0 net/ipv6/addrconf.c:6213 ipv6_ifa_notify net/ipv6/addrconf.c:6252 [inline] addrconf_dad_completed+0x19d/0x1030 net/ipv6/addrconf.c:4263 addrconf_dad_work+0x7f6/0x14b0 net/ipv6/addrconf.c:4211 page last free pid 4799 tgid 4799 stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1140 [inline] free_unref_page_prepare+0x51f/0xb10 mm/page_alloc.c:2383 free_unref_page+0x33/0x3c0 mm/page_alloc.c:2523 qlink_free mm/kasan/quarantine.c:178 [inline] qlist_free_all+0xc1/0x1e0 mm/kasan/quarantine.c:194 kasan_quarantine_reduce+0x18e/0x1d0 mm/kasan/quarantine.c:301 __kasan_slab_alloc+0x65/0x90 mm/kasan/common.c:292 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] kmalloc_trace+0x147/0x330 mm/slub.c:4011 kmalloc include/linux/slab.h:590 [inline] usb_control_msg+0xbd/0x4a0 drivers/usb/core/message.c:144 get_port_status drivers/usb/core/hub.c:604 [inline] hub_ext_port_status+0x147/0x480 drivers/usb/core/hub.c:621 usb_hub_port_status drivers/usb/core/hub.c:643 [inline] hub_port_debounce+0x1a3/0x3d0 drivers/usb/core/hub.c:4601 hub_port_debounce_be_stable drivers/usb/core/hub.h:181 [inline] hub_port_connect drivers/usb/core/hub.c:5317 [inline] hub_port_connect_change drivers/usb/core/hub.c:5605 [inline] port_event drivers/usb/core/hub.c:5765 [inline] hub_event+0x3470/0x4e10 drivers/usb/core/hub.c:5847 process_one_work+0x8a4/0x15f0 kernel/workqueue.c:2633 process_scheduled_works kernel/workqueue.c:2706 [inline] worker_thread+0x8b6/0x1290 kernel/workqueue.c:2787 kthread+0x2c1/0x3a0 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242 Memory state around the buggy address: ffff88807b983580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807b983600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88807b983680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88807b983700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88807b983780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================