================================================================== BUG: KASAN: slab-use-after-free in __raw_spin_lock_bh include/linux/spinlock_api_smp.h:150 [inline] BUG: KASAN: slab-use-after-free in _raw_spin_lock_bh+0x33/0x40 kernel/locking/spinlock.c:182 Read of size 1 at addr ffff888029bed5a0 by task syz.5.1540/10361 CPU: 3 UID: 0 PID: 10361 Comm: syz.5.1540 Tainted: G S L syzkaller #0 PREEMPT(full) Tainted: [S]=CPU_OUT_OF_SPEC, [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 __kasan_check_byte+0x36/0x50 mm/kasan/common.c:574 kasan_check_byte include/linux/kasan.h:402 [inline] lock_acquire kernel/locking/lockdep.c:5842 [inline] lock_acquire+0x132/0x370 kernel/locking/lockdep.c:5825 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:150 [inline] _raw_spin_lock_bh+0x33/0x40 kernel/locking/spinlock.c:182 spin_lock_bh include/linux/spinlock.h:348 [inline] bt_accept_unlink+0x64/0x370 net/bluetooth/af_bluetooth.c:262 l2cap_sock_teardown_cb+0x1a3/0x3f0 net/bluetooth/l2cap_sock.c:1710 l2cap_chan_del+0xa6/0x920 net/bluetooth/l2cap_core.c:687 l2cap_conn_del+0x34f/0x6b0 net/bluetooth/l2cap_core.c:1825 l2cap_disconn_cfm net/bluetooth/l2cap_core.c:7601 [inline] l2cap_disconn_cfm+0x9f/0x100 net/bluetooth/l2cap_core.c:7594 hci_disconn_cfm include/net/bluetooth/hci_core.h:2154 [inline] hci_conn_hash_flush+0x10e/0x280 net/bluetooth/hci_conn.c:2735 hci_dev_close_sync+0x5cf/0x13c0 net/bluetooth/hci_sync.c:5513 hci_dev_do_close+0x2e/0xb0 net/bluetooth/hci_core.c:499 hci_unregister_dev+0x23f/0x690 net/bluetooth/hci_core.c:2678 vhci_release+0x17d/0x230 drivers/bluetooth/hci_vhci.c:700 __fput+0x3ff/0xb50 fs/file_table.c:512 task_work_run+0x150/0x240 kernel/task_work.c:233 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0x951/0x2ae0 kernel/exit.c:1009 do_group_exit+0xd5/0x2a0 kernel/exit.c:1152 get_signal+0x1ec7/0x21e0 kernel/signal.c:3046 arch_do_signal_or_restart+0x91/0x7e0 arch/x86/kernel/signal.c:337 __exit_to_user_mode_loop kernel/entry/common.c:66 [inline] exit_to_user_mode_loop kernel/entry/common.c:101 [inline] __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline] irqentry_exit_to_user_mode_prepare include/linux/irq-entry-common.h:244 [inline] irqentry_exit_to_user_mode include/linux/irq-entry-common.h:315 [inline] irqentry_exit+0x402/0xa00 kernel/entry/common.c:165 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:595 RIP: 0033:0x7f8d2519e021 Code: Unable to access opcode bytes at 0x7f8d2519dff7. RSP: 002b:0000000000000030 EFLAGS: 00010217 RAX: 0000000000000000 RBX: 00007f8d25425fa0 RCX: 00007f8d2519e019 RDX: 0000000000000000 RSI: 0000000000000030 RDI: 0000000000000011 RBP: 00007f8d2523500c R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000 R13: 00007f8d25426038 R14: 00007f8d25425fa0 R15: 00007ffc5842a9d8 Allocated by task 5136: 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:398 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:415 kasan_kmalloc include/linux/kasan.h:263 [inline] __kmalloc_cache_noprof+0x2e5/0x6c0 mm/slub.c:5489 _kmalloc_noprof include/linux/slab.h:988 [inline] syslog_print+0xf8/0x620 kernel/printk/printk.c:1585 do_syslog+0x5bd/0x6d0 kernel/printk/printk.c:1763 __do_sys_syslog kernel/printk/printk.c:1855 [inline] __se_sys_syslog kernel/printk/printk.c:1853 [inline] __x64_sys_syslog+0x74/0xb0 kernel/printk/printk.c:1853 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 5136: kasan_save_stack+0x30/0x50 mm/kasan/common.c:57 kasan_save_track+0x14/0x30 mm/kasan/common.c:78 kasan_save_free_info+0x3b/0x70 mm/kasan/generic.c:584 poison_slab_object mm/kasan/common.c:253 [inline] __kasan_slab_free+0x5f/0x80 mm/kasan/common.c:285 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:2677 [inline] slab_free mm/slub.c:6377 [inline] kfree+0x22b/0x6c0 mm/slub.c:6692 syslog_print+0x548/0x620 kernel/printk/printk.c:1677 do_syslog+0x5bd/0x6d0 kernel/printk/printk.c:1763 __do_sys_syslog kernel/printk/printk.c:1855 [inline] __se_sys_syslog kernel/printk/printk.c:1853 [inline] __x64_sys_syslog+0x74/0xb0 kernel/printk/printk.c:1853 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888029bed000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1440 bytes inside of freed 2048-byte region [ffff888029bed000, ffff888029bed800) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888029bee000 pfn:0x29be8 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000240(workingset|head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000240 ffff88801bc42f00 ffffea0000968610 ffffea0000cb2c10 raw: ffff888029bee000 0000000800080005 00000000f5000000 0000000000000000 head: 00fff00000000240 ffff88801bc42f00 ffffea0000968610 ffffea0000cb2c10 head: ffff888029bee000 0000000800080005 00000000f5000000 0000000000000000 head: 00fff00000000003 fffffffffffffe01 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 0xd2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5738, tgid 5738 (syz-executor), ts 46569873435, free_ts 44410002861 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0xfd/0x120 mm/page_alloc.c:1859 prep_new_page mm/page_alloc.c:1867 [inline] get_page_from_freelist+0xf48/0x3530 mm/page_alloc.c:3946 __alloc_frozen_pages_noprof+0x299/0x2dc0 mm/page_alloc.c:5304 alloc_slab_page mm/slub.c:3266 [inline] allocate_slab mm/slub.c:3380 [inline] new_slab+0xa2/0x640 mm/slub.c:3426 refill_objects+0xe3/0x410 mm/slub.c:7310 refill_sheaf mm/slub.c:2804 [inline] __pcs_replace_empty_main+0x376/0x680 mm/slub.c:4675 alloc_from_pcs mm/slub.c:4773 [inline] slab_alloc_node mm/slub.c:4905 [inline] __do_kmalloc_node mm/slub.c:5333 [inline] __kmalloc_node_track_caller_noprof+0x679/0x830 mm/slub.c:5471 kmalloc_reserve+0xe8/0x350 net/core/skbuff.c:637 pskb_expand_head+0x249/0x10e0 net/core/skbuff.c:2312 netlink_trim+0x22d/0x2f0 net/netlink/af_netlink.c:1300 netlink_broadcast_filtered+0x6d/0xf20 net/netlink/af_netlink.c:1518 nlmsg_multicast_filtered include/net/netlink.h:1165 [inline] nlmsg_multicast include/net/netlink.h:1184 [inline] nlmsg_notify+0xb1/0x290 net/netlink/af_netlink.c:2599 rtnl_notify net/core/rtnetlink.c:963 [inline] rtmsg_ifinfo_send net/core/rtnetlink.c:4553 [inline] rtmsg_ifinfo_event net/core/rtnetlink.c:4569 [inline] rtmsg_ifinfo_event net/core/rtnetlink.c:4556 [inline] rtmsg_ifinfo+0x177/0x1b0 net/core/rtnetlink.c:4575 __dev_notify_flags+0x24c/0x2e0 net/core/dev.c:9795 rtnl_configure_link+0x1b5/0x280 net/core/rtnetlink.c:3679 rtnl_newlink_create net/core/rtnetlink.c:3923 [inline] __rtnl_newlink net/core/rtnetlink.c:4044 [inline] rtnl_newlink+0x153b/0x2380 net/core/rtnetlink.c:4159 page last free pid 5716 tgid 5716 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] __free_pages_prepare mm/page_alloc.c:1406 [inline] __free_frozen_pages+0x79f/0x1090 mm/page_alloc.c:2950 __folio_put+0x3b4/0x5f0 mm/swap.c:112 folio_put include/linux/mm.h:2124 [inline] put_page include/linux/mm.h:2193 [inline] put_netmem include/net/netmem.h:394 [inline] skb_page_unref include/linux/skbuff_ref.h:43 [inline] __skb_frag_unref include/linux/skbuff_ref.h:56 [inline] skb_release_data+0x649/0x8e0 net/core/skbuff.c:1116 skb_release_all net/core/skbuff.c:1197 [inline] __kfree_skb+0x4f/0x70 net/core/skbuff.c:1211 tcp_wmem_free_skb include/net/tcp.h:334 [inline] tcp_rtx_queue_unlink_and_free include/net/tcp.h:2321 [inline] tcp_clean_rtx_queue net/ipv4/tcp_input.c:3698 [inline] tcp_ack+0x2079/0x7650 net/ipv4/tcp_input.c:4400 tcp_rcv_established+0x282a/0x3990 net/ipv4/tcp_input.c:6642 tcp_v4_do_rcv+0xbb6/0x1260 net/ipv4/tcp_ipv4.c:1854 sk_backlog_rcv include/net/sock.h:1190 [inline] __release_sock+0x35a/0x440 net/core/sock.c:3261 release_sock+0x1e5/0x280 net/core/sock.c:3860 tcp_recvmsg+0x14c/0x630 net/ipv4/tcp.c:2945 inet_recvmsg+0xd5/0x4c0 net/ipv4/af_inet.c:894 sock_recvmsg_nosec net/socket.c:1126 [inline] sock_recvmsg+0x1b8/0x220 net/socket.c:1148 sock_read_iter+0x2b0/0x3a0 net/socket.c:1217 new_sync_read fs/read_write.c:493 [inline] vfs_read+0x960/0xb40 fs/read_write.c:574 ksys_read+0x1f8/0x250 fs/read_write.c:716 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94 Memory state around the buggy address: ffff888029bed480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888029bed500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888029bed580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888029bed600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888029bed680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================