================================================================== BUG: KASAN: slab-use-after-free in lecd_attach net/atm/lec.c:751 [inline] BUG: KASAN: slab-use-after-free in lane_ioctl+0xa77/0x1e60 net/atm/lec.c:1008 Read of size 8 at addr ffff88807cde4e68 by task syz.3.726/8347 CPU: 0 UID: 0 PID: 8347 Comm: syz.3.726 Not tainted 6.16.0-rc1-syzkaller-00234-gde74998c3008 #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xd2/0x2b0 mm/kasan/report.c:521 kasan_report+0x118/0x150 mm/kasan/report.c:634 lecd_attach net/atm/lec.c:751 [inline] lane_ioctl+0xa77/0x1e60 net/atm/lec.c:1008 do_vcc_ioctl+0x36a/0x9e0 net/atm/ioctl.c:159 sock_do_ioctl+0xd9/0x300 net/socket.c:1190 sock_ioctl+0x576/0x790 net/socket.c:1311 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:907 [inline] __se_sys_ioctl+0xf9/0x170 fs/ioctl.c:893 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f9ce118e929 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f9ce2041038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f9ce13b5fa0 RCX: 00007f9ce118e929 RDX: 0000000000000000 RSI: 00000000000061d0 RDI: 0000000000000004 RBP: 00007f9ce1210b39 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f9ce13b5fa0 R15: 00007ffe0b938778 Allocated by task 8272: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:394 kasan_kmalloc include/linux/kasan.h:260 [inline] __do_kmalloc_node mm/slub.c:4328 [inline] __kvmalloc_node_noprof+0x30d/0x5f0 mm/slub.c:5015 alloc_netdev_mqs+0xa6/0x11e0 net/core/dev.c:11752 lecd_attach net/atm/lec.c:737 [inline] lane_ioctl+0xac6/0x1e60 net/atm/lec.c:1008 do_vcc_ioctl+0x36a/0x9e0 net/atm/ioctl.c:159 sock_do_ioctl+0xd9/0x300 net/socket.c:1190 sock_ioctl+0x576/0x790 net/socket.c:1311 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:907 [inline] __se_sys_ioctl+0xf9/0x170 fs/ioctl.c:893 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 8272: kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:247 [inline] __kasan_slab_free+0x62/0x70 mm/kasan/common.c:264 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2381 [inline] slab_free mm/slub.c:4643 [inline] kfree+0x18e/0x440 mm/slub.c:4842 lecd_attach net/atm/lec.c:744 [inline] lane_ioctl+0xbd2/0x1e60 net/atm/lec.c:1008 do_vcc_ioctl+0x36a/0x9e0 net/atm/ioctl.c:159 sock_do_ioctl+0xd9/0x300 net/socket.c:1190 sock_ioctl+0x576/0x790 net/socket.c:1311 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:907 [inline] __se_sys_ioctl+0xf9/0x170 fs/ioctl.c:893 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88807cde4000 which belongs to the cache kmalloc-cg-4k of size 4096 The buggy address is located 3688 bytes inside of freed 4096-byte region [ffff88807cde4000, ffff88807cde5000) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7cde0 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff888024701e01 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801a44b500 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000040004 00000000f5000000 ffff888024701e01 head: 00fff00000000040 ffff88801a44b500 dead000000000122 0000000000000000 head: 0000000000000000 0000000000040004 00000000f5000000 ffff888024701e01 head: 00fff00000000003 ffffea0001f37801 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 8271, tgid 8271 (modprobe), ts 186083730468, free_ts 185752812641 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4959 alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2419 alloc_slab_page mm/slub.c:2451 [inline] allocate_slab+0x8a/0x3b0 mm/slub.c:2619 new_slab mm/slub.c:2673 [inline] ___slab_alloc+0xbfc/0x1480 mm/slub.c:3859 __slab_alloc mm/slub.c:3949 [inline] __slab_alloc_node mm/slub.c:4024 [inline] slab_alloc_node mm/slub.c:4185 [inline] __do_kmalloc_node mm/slub.c:4327 [inline] __kvmalloc_node_noprof+0x429/0x5f0 mm/slub.c:5015 seq_buf_alloc fs/seq_file.c:38 [inline] seq_read_iter+0x1fd/0xe10 fs/seq_file.c:210 proc_reg_read_iter+0x1b4/0x280 fs/proc/inode.c:299 new_sync_read fs/read_write.c:491 [inline] vfs_read+0x4cd/0x980 fs/read_write.c:572 ksys_read+0x145/0x250 fs/read_write.c:715 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f page last free pid 5831 tgid 5831 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] __free_frozen_pages+0xc71/0xe70 mm/page_alloc.c:2706 discard_slab mm/slub.c:2717 [inline] __put_partials+0x161/0x1c0 mm/slub.c:3186 put_cpu_partial+0x17c/0x250 mm/slub.c:3261 __slab_free+0x2f7/0x400 mm/slub.c:4513 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x97/0x140 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4148 [inline] slab_alloc_node mm/slub.c:4197 [inline] __do_kmalloc_node mm/slub.c:4327 [inline] __kmalloc_node_noprof+0x21b/0x4e0 mm/slub.c:4334 kmalloc_node_noprof include/linux/slab.h:932 [inline] __vmalloc_area_node mm/vmalloc.c:3690 [inline] __vmalloc_node_range_noprof+0x5a9/0x12f0 mm/vmalloc.c:3885 __vmalloc_node_noprof mm/vmalloc.c:3948 [inline] vzalloc_noprof+0xb2/0xf0 mm/vmalloc.c:4022 alloc_counters+0xd3/0x6d0 net/ipv4/netfilter/ip_tables.c:799 copy_entries_to_user net/ipv6/netfilter/ip6_tables.c:837 [inline] get_entries net/ipv6/netfilter/ip6_tables.c:1039 [inline] do_ip6t_get_ctl+0xa94/0x1180 net/ipv6/netfilter/ip6_tables.c:1677 nf_getsockopt+0x26b/0x290 net/netfilter/nf_sockopt.c:116 ipv6_getsockopt+0x1ed/0x290 net/ipv6/ipv6_sockglue.c:1493 do_sock_getsockopt+0x35d/0x650 net/socket.c:2357 __sys_getsockopt net/socket.c:2386 [inline] __do_sys_getsockopt net/socket.c:2393 [inline] __se_sys_getsockopt net/socket.c:2390 [inline] __x64_sys_getsockopt+0x1a5/0x250 net/socket.c:2390 Memory state around the buggy address: ffff88807cde4d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807cde4d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88807cde4e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88807cde4e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88807cde4f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================