================================================================== 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+0x16c/0x194 security/selinux/hooks.c:5761 Read of size 8 at addr ffff000025874498 by task kworker/u8:9/2108 CPU: 1 UID: 0 PID: 2108 Comm: kworker/u8:9 Not tainted 6.12.0-syzkaller-12128-gf788b5ef1ca9 #0 Hardware name: linux,dummy-virt (DT) Workqueue: krdsd rds_tcp_accept_worker Call trace: show_stack+0x18/0x24 arch/arm64/kernel/stacktrace.c:484 (C) __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xa4/0xf4 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0xf4/0x5a0 mm/kasan/report.c:489 kasan_report+0xc8/0x108 mm/kasan/report.c:602 __asan_report_load8_noabort+0x20/0x2c mm/kasan/report_generic.c:381 selinux_sock security/selinux/include/objsec.h:207 [inline] selinux_ip_output+0x16c/0x194 security/selinux/hooks.c:5761 nf_hook_entry_hookfn include/linux/netfilter.h:154 [inline] nf_hook_slow+0xa4/0x1d8 net/netfilter/core.c:626 nf_hook include/linux/netfilter.h:269 [inline] __ip_local_out+0x3b8/0x6d4 net/ipv4/ip_output.c:119 ip_local_out net/ipv4/ip_output.c:128 [inline] ip_send_skb+0x4c/0x2a4 net/ipv4/ip_output.c:1505 ip_push_pending_frames net/ipv4/ip_output.c:1525 [inline] ip_send_unicast_reply+0x914/0x1408 net/ipv4/ip_output.c:1672 tcp_v4_send_ack+0x758/0x11e0 net/ipv4/tcp_ipv4.c:1024 tcp_v4_timewait_ack net/ipv4/tcp_ipv4.c:1077 [inline] tcp_v4_rcv+0x1f88/0x32d8 net/ipv4/tcp_ipv4.c:2428 ip_protocol_deliver_rcu+0xb8/0x3f4 net/ipv4/ip_input.c:205 ip_local_deliver_finish+0x258/0x458 net/ipv4/ip_input.c:233 NF_HOOK include/linux/netfilter.h:314 [inline] NF_HOOK include/linux/netfilter.h:308 [inline] ip_local_deliver+0x16c/0x3a4 net/ipv4/ip_input.c:254 dst_input include/net/dst.h:460 [inline] ip_rcv_finish+0x140/0x224 net/ipv4/ip_input.c:447 NF_HOOK include/linux/netfilter.h:314 [inline] NF_HOOK include/linux/netfilter.h:308 [inline] ip_rcv+0xc0/0x2c8 net/ipv4/ip_input.c:567 __netif_receive_skb_one_core+0xf4/0x168 net/core/dev.c:5672 __netif_receive_skb+0x24/0x14c net/core/dev.c:5785 process_backlog+0x384/0x1588 net/core/dev.c:6117 __napi_poll.constprop.0+0x94/0x3b8 net/core/dev.c:6877 napi_poll net/core/dev.c:6946 [inline] net_rx_action+0x808/0xb84 net/core/dev.c:7068 handle_softirqs+0x2d8/0xdb4 kernel/softirq.c:554 __do_softirq+0x14/0x20 kernel/softirq.c:588 ____do_softirq+0x10/0x1c arch/arm64/kernel/irq.c:81 call_on_irq_stack+0x24/0x4c arch/arm64/kernel/entry.S:891 do_softirq_own_stack+0x1c/0x2c arch/arm64/kernel/irq.c:86 do_softirq kernel/softirq.c:455 [inline] do_softirq+0x12c/0x150 kernel/softirq.c:442 __local_bh_enable_ip+0x414/0x4a4 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+0x6d0/0x331c net/core/dev.c:4461 dev_queue_xmit include/linux/netdevice.h:3168 [inline] neigh_hh_output include/net/neighbour.h:523 [inline] neigh_output include/net/neighbour.h:537 [inline] ip_finish_output2+0xa34/0x1e44 net/ipv4/ip_output.c:236 __ip_finish_output net/ipv4/ip_output.c:314 [inline] __ip_finish_output+0x2bc/0x4e0 net/ipv4/ip_output.c:296 ip_finish_output+0x34/0x290 net/ipv4/ip_output.c:324 NF_HOOK_COND include/linux/netfilter.h:303 [inline] ip_output+0x144/0x404 net/ipv4/ip_output.c:434 dst_output include/net/dst.h:450 [inline] ip_local_out net/ipv4/ip_output.c:130 [inline] __ip_queue_xmit+0x80c/0x18b8 net/ipv4/ip_output.c:536 ip_queue_xmit+0x44/0x64 net/ipv4/ip_output.c:550 __tcp_transmit_skb+0x13b8/0x36f4 net/ipv4/tcp_output.c:1466 tcp_transmit_skb net/ipv4/tcp_output.c:1484 [inline] tcp_write_xmit+0x11ec/0x82b8 net/ipv4/tcp_output.c:2827 __tcp_push_pending_frames+0x88/0x2a8 net/ipv4/tcp_output.c:3010 tcp_send_fin+0x13c/0x9cc net/ipv4/tcp_output.c:3616 __tcp_close+0x8f8/0xe78 net/ipv4/tcp.c:3130 tcp_close+0x2c/0x10c net/ipv4/tcp.c:3221 inet_release+0xd4/0x1d0 net/ipv4/af_inet.c:435 inet6_release+0x4c/0x6c net/ipv6/af_inet6.c:487 __sock_release net/socket.c:640 [inline] sock_release+0x7c/0x170 net/socket.c:668 rds_tcp_accept_one+0x27c/0x9c4 net/rds/tcp_listen.c:234 rds_tcp_accept_worker+0x50/0x74 net/rds/tcp.c:531 process_one_work+0x7b4/0x189c kernel/workqueue.c:3229 process_scheduled_works kernel/workqueue.c:3310 [inline] worker_thread+0x730/0xb74 kernel/workqueue.c:3391 kthread+0x27c/0x300 kernel/kthread.c:389 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862 The buggy address belongs to the object at ffff000025874420 which belongs to the cache tw_sock_TCP of size 288 The buggy address is located 120 bytes inside of allocated 288-byte region [ffff000025874420, ffff000025874540) The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x65874 head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff00001dd6c401 flags: 0x1ffc00000000040(head|node=0|zone=0|lastcpupid=0x7ff) page_type: f5(slab) raw: 01ffc00000000040 ffff00000dbdb8c0 dead000000000122 0000000000000000 raw: 0000000000000000 0000000080170017 00000001f5000000 ffff00001dd6c401 head: 01ffc00000000040 ffff00000dbdb8c0 dead000000000122 0000000000000000 head: 0000000000000000 0000000080170017 00000001f5000000 ffff00001dd6c401 head: 01ffc00000000001 fffffdffc0961d01 ffffffffffffffff 0000000000000000 head: ffff000000000002 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff000025874380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff000025874400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff000025874480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff000025874500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff000025874580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== Unable to handle kernel paging request at virtual address dfff800000000002 KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017] Mem abort info: ESR = 0x0000000096000005 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x05: level 1 translation fault Data abort info: ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000 CM = 0, WnR = 0, TnD = 0, TagAccess = 0 GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [dfff800000000002] address between user and kernel address ranges Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP Modules linked in: CPU: 1 UID: 0 PID: 2108 Comm: kworker/u8:9 Tainted: G B 6.12.0-syzkaller-12128-gf788b5ef1ca9 #0 Tainted: [B]=BAD_PAGE Hardware name: linux,dummy-virt (DT) Workqueue: krdsd rds_tcp_accept_worker pstate: 40000005 (nZcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : selinux_ip_output+0xc8/0x194 security/selinux/hooks.c:5762 lr : selinux_sock security/selinux/include/objsec.h:207 [inline] lr : selinux_ip_output+0x16c/0x194 security/selinux/hooks.c:5761 sp : ffff80008cf56f00 x29: ffff80008cf56f00 x28: ffff00000f2d96f0 x27: ffff00000f156500 x26: ffff80008103eb58 x25: dfff800000000000 x24: 0000000000000001 x23: ffff00001c6fa900 x22: ffff80008cf57020 x21: 0000000000000006 x20: 0000000000000000 x19: ffff00000f156500 x18: 000000006ec46465 x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 x14: 0000000000000000 x13: 000000000000f1f1 x12: ffff7000110e5615 x11: 1ffff000110e5614 x10: ffff7000110e5614 x9 : dfff800000000000 x8 : ffff80008872b0a7 x7 : 0000000000000001 x6 : ffff7000110e5614 x5 : ffff80008872b0a0 x4 : ffff7000110e5615 x3 : 0000000000000002 x2 : 0000000000000003 x1 : dfff800000000000 x0 : 0000000000000010 Call trace: selinux_ip_output+0xc8/0x194 security/selinux/hooks.c:5762 (P) selinux_sock security/selinux/include/objsec.h:207 [inline] (L) selinux_ip_output+0x16c/0x194 security/selinux/hooks.c:5761 (L) nf_hook_entry_hookfn include/linux/netfilter.h:154 [inline] nf_hook_slow+0xa4/0x1d8 net/netfilter/core.c:626 nf_hook include/linux/netfilter.h:269 [inline] __ip_local_out+0x3b8/0x6d4 net/ipv4/ip_output.c:119 ip_local_out net/ipv4/ip_output.c:128 [inline] ip_send_skb+0x4c/0x2a4 net/ipv4/ip_output.c:1505 ip_push_pending_frames net/ipv4/ip_output.c:1525 [inline] ip_send_unicast_reply+0x914/0x1408 net/ipv4/ip_output.c:1672 tcp_v4_send_ack+0x758/0x11e0 net/ipv4/tcp_ipv4.c:1024 tcp_v4_timewait_ack net/ipv4/tcp_ipv4.c:1077 [inline] tcp_v4_rcv+0x1f88/0x32d8 net/ipv4/tcp_ipv4.c:2428 ip_protocol_deliver_rcu+0xb8/0x3f4 net/ipv4/ip_input.c:205 ip_local_deliver_finish+0x258/0x458 net/ipv4/ip_input.c:233 NF_HOOK include/linux/netfilter.h:314 [inline] NF_HOOK include/linux/netfilter.h:308 [inline] ip_local_deliver+0x16c/0x3a4 net/ipv4/ip_input.c:254 dst_input include/net/dst.h:460 [inline] ip_rcv_finish+0x140/0x224 net/ipv4/ip_input.c:447 NF_HOOK include/linux/netfilter.h:314 [inline] NF_HOOK include/linux/netfilter.h:308 [inline] ip_rcv+0xc0/0x2c8 net/ipv4/ip_input.c:567 __netif_receive_skb_one_core+0xf4/0x168 net/core/dev.c:5672 __netif_receive_skb+0x24/0x14c net/core/dev.c:5785 process_backlog+0x384/0x1588 net/core/dev.c:6117 __napi_poll.constprop.0+0x94/0x3b8 net/core/dev.c:6877 napi_poll net/core/dev.c:6946 [inline] net_rx_action+0x808/0xb84 net/core/dev.c:7068 handle_softirqs+0x2d8/0xdb4 kernel/softirq.c:554 __do_softirq+0x14/0x20 kernel/softirq.c:588 ____do_softirq+0x10/0x1c arch/arm64/kernel/irq.c:81 call_on_irq_stack+0x24/0x4c arch/arm64/kernel/entry.S:891 do_softirq_own_stack+0x1c/0x2c arch/arm64/kernel/irq.c:86 do_softirq kernel/softirq.c:455 [inline] do_softirq+0x12c/0x150 kernel/softirq.c:442 __local_bh_enable_ip+0x414/0x4a4 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+0x6d0/0x331c net/core/dev.c:4461 dev_queue_xmit include/linux/netdevice.h:3168 [inline] neigh_hh_output include/net/neighbour.h:523 [inline] neigh_output include/net/neighbour.h:537 [inline] ip_finish_output2+0xa34/0x1e44 net/ipv4/ip_output.c:236 __ip_finish_output net/ipv4/ip_output.c:314 [inline] __ip_finish_output+0x2bc/0x4e0 net/ipv4/ip_output.c:296 ip_finish_output+0x34/0x290 net/ipv4/ip_output.c:324 NF_HOOK_COND include/linux/netfilter.h:303 [inline] ip_output+0x144/0x404 net/ipv4/ip_output.c:434 dst_output include/net/dst.h:450 [inline] ip_local_out net/ipv4/ip_output.c:130 [inline] __ip_queue_xmit+0x80c/0x18b8 net/ipv4/ip_output.c:536 ip_queue_xmit+0x44/0x64 net/ipv4/ip_output.c:550 __tcp_transmit_skb+0x13b8/0x36f4 net/ipv4/tcp_output.c:1466 tcp_transmit_skb net/ipv4/tcp_output.c:1484 [inline] tcp_write_xmit+0x11ec/0x82b8 net/ipv4/tcp_output.c:2827 __tcp_push_pending_frames+0x88/0x2a8 net/ipv4/tcp_output.c:3010 tcp_send_fin+0x13c/0x9cc net/ipv4/tcp_output.c:3616 __tcp_close+0x8f8/0xe78 net/ipv4/tcp.c:3130 tcp_close+0x2c/0x10c net/ipv4/tcp.c:3221 inet_release+0xd4/0x1d0 net/ipv4/af_inet.c:435 inet6_release+0x4c/0x6c net/ipv6/af_inet6.c:487 __sock_release net/socket.c:640 [inline] sock_release+0x7c/0x170 net/socket.c:668 rds_tcp_accept_one+0x27c/0x9c4 net/rds/tcp_listen.c:234 rds_tcp_accept_worker+0x50/0x74 net/rds/tcp.c:531 process_one_work+0x7b4/0x189c kernel/workqueue.c:3229 process_scheduled_works kernel/workqueue.c:3310 [inline] worker_thread+0x730/0xb74 kernel/workqueue.c:3391 kthread+0x27c/0x300 kernel/kthread.c:389 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862 Code: 52800062 8b000294 91004280 d343fc03 (38e16861) ---[ end trace 0000000000000000 ]--- ---------------- Code disassembly (best guess): 0: 52800062 mov w2, #0x3 // #3 4: 8b000294 add x20, x20, x0 8: 91004280 add x0, x20, #0x10 c: d343fc03 lsr x3, x0, #3 * 10: 38e16861 ldrsb w1, [x3, x1] <-- trapping instruction