================================================================== BUG: KASAN: slab-out-of-bounds in selinux_sock security/selinux/include/objsec.h:207 [inline] BUG: KASAN: slab-out-of-bounds in selinux_ip_output+0x1e0/0x1f0 security/selinux/hooks.c:5761 Read of size 8 at addr ffff888053c885f8 by task kworker/u8:5/1791 CPU: 1 UID: 0 PID: 1791 Comm: kworker/u8:5 Not tainted 6.12.0-syzkaller-09073-g9f16d5e6f220 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Workqueue: krdsd rds_send_worker Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xc3/0x620 mm/kasan/report.c:489 kasan_report+0xd9/0x110 mm/kasan/report.c:602 selinux_sock security/selinux/include/objsec.h:207 [inline] selinux_ip_output+0x1e0/0x1f0 security/selinux/hooks.c:5761 nf_hook_entry_hookfn include/linux/netfilter.h:154 [inline] nf_hook_slow+0xbb/0x200 net/netfilter/core.c:626 nf_hook+0x474/0x7d0 include/linux/netfilter.h:269 NF_HOOK include/linux/netfilter.h:312 [inline] ip6_xmit+0xd44/0x2130 net/ipv6/ip6_output.c:366 tcp_v6_send_response+0x11d9/0x25e0 net/ipv6/tcp_ipv6.c:999 tcp_v6_send_reset+0x636/0x1590 net/ipv6/tcp_ipv6.c:1135 tcp_v6_rcv+0x311f/0x3fd0 net/ipv6/tcp_ipv6.c:1996 ip6_protocol_deliver_rcu+0x180/0x1510 net/ipv6/ip6_input.c:436 ip6_input_finish+0x14f/0x2f0 net/ipv6/ip6_input.c:481 NF_HOOK include/linux/netfilter.h:314 [inline] NF_HOOK include/linux/netfilter.h:308 [inline] ip6_input+0xa1/0xd0 net/ipv6/ip6_input.c:490 dst_input include/net/dst.h:460 [inline] ip6_rcv_finish+0x1ad/0x5b0 net/ipv6/ip6_input.c:79 ip_sabotage_in+0x21b/0x290 net/bridge/br_netfilter_hooks.c:1021 nf_hook_entry_hookfn include/linux/netfilter.h:154 [inline] nf_hook_slow+0xbb/0x200 net/netfilter/core.c:626 nf_hook.constprop.0+0x42e/0x750 include/linux/netfilter.h:269 NF_HOOK include/linux/netfilter.h:312 [inline] ipv6_rcv+0xa4/0x680 net/ipv6/ip6_input.c:309 __netif_receive_skb_one_core+0x12e/0x1e0 net/core/dev.c:5672 __netif_receive_skb+0x1d/0x160 net/core/dev.c:5785 netif_receive_skb_internal net/core/dev.c:5871 [inline] netif_receive_skb+0x13f/0x7b0 net/core/dev.c:5930 NF_HOOK include/linux/netfilter.h:314 [inline] NF_HOOK include/linux/netfilter.h:308 [inline] br_pass_frame_up+0x346/0x490 net/bridge/br_input.c:70 br_handle_frame_finish+0x122c/0x1c80 net/bridge/br_input.c:208 br_nf_hook_thresh+0x303/0x410 net/bridge/br_netfilter_hooks.c:1198 br_nf_pre_routing_finish_ipv6+0x76a/0xfb0 net/bridge/br_netfilter_ipv6.c:154 NF_HOOK include/linux/netfilter.h:314 [inline] br_nf_pre_routing_ipv6+0x3ce/0x8c0 net/bridge/br_netfilter_ipv6.c:184 br_nf_pre_routing+0x860/0x15b0 net/bridge/br_netfilter_hooks.c:536 nf_hook_entry_hookfn include/linux/netfilter.h:154 [inline] nf_hook_bridge_pre net/bridge/br_input.c:277 [inline] br_handle_frame+0x9eb/0x1490 net/bridge/br_input.c:424 __netif_receive_skb_core.constprop.0+0xa76/0x4470 net/core/dev.c:5566 __netif_receive_skb_one_core+0xb1/0x1e0 net/core/dev.c:5670 __netif_receive_skb+0x1d/0x160 net/core/dev.c:5785 process_backlog+0x443/0x15f0 net/core/dev.c:6117 __napi_poll.constprop.0+0xb7/0x550 net/core/dev.c:6877 napi_poll net/core/dev.c:6946 [inline] net_rx_action+0xa94/0x1010 net/core/dev.c:7068 handle_softirqs+0x213/0x8f0 kernel/softirq.c:554 do_softirq kernel/softirq.c:455 [inline] do_softirq+0xb2/0xf0 kernel/softirq.c:442 __local_bh_enable_ip+0x100/0x120 kernel/softirq.c:382 local_bh_enable include/linux/bottom_half.h:33 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:919 [inline] __dev_queue_xmit+0x8b0/0x43e0 net/core/dev.c:4461 dev_queue_xmit include/linux/netdevice.h:3168 [inline] neigh_resolve_output net/core/neighbour.c:1514 [inline] neigh_resolve_output+0x5bc/0x950 net/core/neighbour.c:1494 neigh_output include/net/neighbour.h:539 [inline] ip6_finish_output2+0xb1b/0x2070 net/ipv6/ip6_output.c:141 __ip6_finish_output net/ipv6/ip6_output.c:215 [inline] ip6_finish_output+0x3f9/0x1360 net/ipv6/ip6_output.c:226 NF_HOOK_COND include/linux/netfilter.h:303 [inline] ip6_output+0x1f8/0x540 net/ipv6/ip6_output.c:247 dst_output include/net/dst.h:450 [inline] NF_HOOK include/linux/netfilter.h:314 [inline] NF_HOOK include/linux/netfilter.h:308 [inline] ip6_xmit+0x1234/0x2130 net/ipv6/ip6_output.c:366 inet6_csk_xmit+0x3ce/0x740 net/ipv6/inet6_connection_sock.c:135 __tcp_transmit_skb+0x1b02/0x3df0 net/ipv4/tcp_output.c:1466 tcp_transmit_skb net/ipv4/tcp_output.c:1484 [inline] tcp_write_xmit+0x12b1/0x8560 net/ipv4/tcp_output.c:2827 __tcp_push_pending_frames+0xaf/0x390 net/ipv4/tcp_output.c:3010 tcp_push+0x221/0x6f0 net/ipv4/tcp.c:751 tcp_sendmsg_locked+0x28d1/0x3770 net/ipv4/tcp.c:1326 tcp_sendmsg+0x2e/0x50 net/ipv4/tcp.c:1358 inet6_sendmsg+0xb9/0x140 net/ipv6/af_inet6.c:659 sock_sendmsg_nosec net/socket.c:711 [inline] __sock_sendmsg net/socket.c:726 [inline] sock_sendmsg+0x2b5/0x470 net/socket.c:749 rds_tcp_xmit+0x34e/0xc50 net/rds/tcp_send.c:125 rds_send_xmit+0xf36/0x24a0 net/rds/send.c:366 rds_send_worker+0x8f/0x2e0 net/rds/threads.c:200 process_one_work+0x9c5/0x1ba0 kernel/workqueue.c:3229 process_scheduled_works kernel/workqueue.c:3310 [inline] worker_thread+0x6c8/0xf00 kernel/workqueue.c:3391 kthread+0x2c1/0x3a0 kernel/kthread.c:389 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 The buggy address belongs to the object at ffff888053c88580 which belongs to the cache tw_sock_TCPv6 of size 288 The buggy address is located 120 bytes inside of allocated 288-byte region [ffff888053c88580, ffff888053c886a0) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x53c88 head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff8880361e8301 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88802ffa0c80 dead000000000122 0000000000000000 raw: 0000000000000000 0000000080170017 00000001f5000000 ffff8880361e8301 head: 00fff00000000040 ffff88802ffa0c80 dead000000000122 0000000000000000 head: 0000000000000000 0000000080170017 00000001f5000000 ffff8880361e8301 head: 00fff00000000001 ffffea00014f2201 ffffffffffffffff 0000000000000000 head: 0000000000000002 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 24, tgid 24 (ksoftirqd/1), ts 346394513110, free_ts 342803148518 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1556 prep_new_page mm/page_alloc.c:1564 [inline] get_page_from_freelist+0xfce/0x2f80 mm/page_alloc.c:3474 __alloc_pages_noprof+0x223/0x25a0 mm/page_alloc.c:4751 alloc_pages_mpol_noprof+0x2c9/0x610 mm/mempolicy.c:2265 alloc_slab_page mm/slub.c:2412 [inline] allocate_slab mm/slub.c:2578 [inline] new_slab+0x2c9/0x410 mm/slub.c:2631 ___slab_alloc+0xdac/0x1880 mm/slub.c:3818 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3908 __slab_alloc_node mm/slub.c:3961 [inline] slab_alloc_node mm/slub.c:4122 [inline] kmem_cache_alloc_noprof+0x2a7/0x2f0 mm/slub.c:4141 inet_twsk_alloc+0x120/0x970 net/ipv4/inet_timewait_sock.c:188 tcp_time_wait+0x5f/0xe10 net/ipv4/tcp_minisocks.c:309 tcp_rcv_state_process+0x4935/0x4c40 net/ipv4/tcp_input.c:6917 tcp_v6_do_rcv+0x492/0x1730 net/ipv6/tcp_ipv6.c:1667 tcp_v6_rcv+0x30b3/0x3fd0 net/ipv6/tcp_ipv6.c:1914 ip6_protocol_deliver_rcu+0x180/0x1510 net/ipv6/ip6_input.c:436 ip6_input_finish+0x14f/0x2f0 net/ipv6/ip6_input.c:481 NF_HOOK include/linux/netfilter.h:314 [inline] NF_HOOK include/linux/netfilter.h:308 [inline] ip6_input+0xa1/0xd0 net/ipv6/ip6_input.c:490 page last free pid 25 tgid 25 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1127 [inline] free_unref_page+0x661/0x1080 mm/page_alloc.c:2657 vfree+0x17a/0x890 mm/vmalloc.c:3382 hid_open_report+0x6cf/0x830 drivers/hid/hid-core.c:1346 hid_parse include/linux/hid.h:1123 [inline] kovaplus_probe+0x99/0x8b0 drivers/hid/hid-roccat-kovaplus.c:510 __hid_device_probe drivers/hid/hid-core.c:2725 [inline] hid_device_probe+0x309/0x850 drivers/hid/hid-core.c:2762 call_driver_probe drivers/base/dd.c:579 [inline] really_probe+0x23e/0xa90 drivers/base/dd.c:658 __driver_probe_device+0x1de/0x440 drivers/base/dd.c:800 driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:830 __device_attach_driver+0x1df/0x310 drivers/base/dd.c:958 bus_for_each_drv+0x157/0x1e0 drivers/base/bus.c:459 __device_attach+0x1e8/0x4b0 drivers/base/dd.c:1030 bus_probe_device+0x17f/0x1c0 drivers/base/bus.c:534 device_add+0x114b/0x1a70 drivers/base/core.c:3672 hid_add_device+0x374/0xa60 drivers/hid/hid-core.c:2908 usbhid_probe+0xd32/0x1400 drivers/hid/usbhid/hid-core.c:1431 usb_probe_interface+0x309/0x9d0 drivers/usb/core/driver.c:399 Memory state around the buggy address: ffff888053c88480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888053c88500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888053c88580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888053c88600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888053c88680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== vkms_vblank_simulate: vblank timer overrun