================================================================== BUG: KASAN: global-out-of-bounds in memcmp lib/string.c:687 [inline] BUG: KASAN: global-out-of-bounds in bcmp+0x1a9/0x1e0 lib/string.c:708 Read of size 1 at addr ffffffff9a81c290 by task dhcpcd/5019 CPU: 0 UID: 0 PID: 5019 Comm: dhcpcd Not tainted 6.13.0-syzkaller-09760-g69e858e0b8b2 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x169/0x550 mm/kasan/report.c:489 kasan_report+0x143/0x180 mm/kasan/report.c:602 memcmp lib/string.c:687 [inline] bcmp+0x1a9/0x1e0 lib/string.c:708 rhashtable_compare include/linux/rhashtable.h:585 [inline] __rhashtable_lookup include/linux/rhashtable.h:610 [inline] rhltable_lookup+0x46b/0x810 include/linux/rhashtable.h:696 sta_info_hash_lookup net/mac80211/sta_info.c:200 [inline] sta_info_get_bss+0x128/0x320 net/mac80211/sta_info.c:237 ieee80211_rx_for_interface+0x102/0x3d0 net/mac80211/rx.c:5184 __ieee80211_rx_handle_packet net/mac80211/rx.c:5348 [inline] ieee80211_rx_list+0x2df4/0x3810 net/mac80211/rx.c:5483 ieee80211_rx_napi+0x18a/0x3c0 net/mac80211/rx.c:5506 ieee80211_rx include/net/mac80211.h:5172 [inline] ieee80211_handle_queued_frames+0xe7/0x1e0 net/mac80211/main.c:441 tasklet_action_common+0x426/0x620 kernel/softirq.c:811 handle_softirqs+0x2d4/0x9b0 kernel/softirq.c:561 __do_softirq kernel/softirq.c:595 [inline] invoke_softirq kernel/softirq.c:435 [inline] __irq_exit_rcu+0xf7/0x220 kernel/softirq.c:662 irq_exit_rcu+0x9/0x30 kernel/softirq.c:678 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1049 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] RIP: 0010:_raw_spin_unlock_irqrestore+0xd8/0x140 kernel/locking/spinlock.c:194 Code: 9c 8f 44 24 20 42 80 3c 23 00 74 08 4c 89 f7 e8 2e e4 2d f6 f6 44 24 21 02 75 52 41 f7 c7 00 02 00 00 74 01 fb bf 01 00 00 00 63 8b 95 f5 65 8b 05 94 b8 0b 74 85 c0 74 43 48 c7 04 24 0e 36 RSP: 0018:ffffc9000d19f680 EFLAGS: 00000206 RAX: 50aa5d9a0b984000 RBX: 1ffff92001a33ed4 RCX: ffffffff9a3fd903 RDX: dffffc0000000000 RSI: ffffffff8c0aa680 RDI: 0000000000000001 RBP: ffffc9000d19f718 R08: ffffffff901b4077 R09: 1ffffffff203680e R10: dffffc0000000000 R11: fffffbfff203680f R12: dffffc0000000000 R13: 1ffff92001a33ed0 R14: ffffc9000d19f6a0 R15: 0000000000000246 poll_wait include/linux/poll.h:45 [inline] sock_poll_wait include/net/sock.h:2318 [inline] unix_dgram_poll+0x80/0x650 net/unix/af_unix.c:3257 sock_poll+0x34d/0x410 net/socket.c:1381 vfs_poll include/linux/poll.h:82 [inline] do_pollfd fs/select.c:870 [inline] do_poll fs/select.c:913 [inline] do_sys_poll+0xa69/0x15d0 fs/select.c:1009 __do_sys_ppoll fs/select.c:1115 [inline] __se_sys_ppoll+0x2a0/0x330 fs/select.c:1095 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f780b5a3ad5 Code: 85 d2 74 0d 0f 10 02 48 8d 54 24 20 0f 11 44 24 20 64 8b 04 25 18 00 00 00 85 c0 75 27 41 b8 08 00 00 00 b8 0f 01 00 00 0f 05 <48> 3d 00 f0 ff ff 76 75 48 8b 15 24 73 0d 00 f7 d8 64 89 02 48 83 RSP: 002b:00007ffc5a0c00e0 EFLAGS: 00000246 ORIG_RAX: 000000000000010f RAX: ffffffffffffffda RBX: 000055abc2615e10 RCX: 00007f780b5a3ad5 RDX: 0000000000000000 RSI: 0000000000000003 RDI: 000055abc2615df0 RBP: 00007ffc5a0c0430 R08: 0000000000000008 R09: 00007ffc5a09fde0 R10: 00007ffc5a0c0430 R11: 0000000000000246 R12: 0000000000000000 R13: 000055ab86ea7610 R14: 0000000000000000 R15: 0000000000000000 The buggy address belongs to the variable: rate_control_alloc_sta.__key+0x10/0x20 The buggy address belongs to the physical page: page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1a81c flags: 0xfff00000002000(reserved|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000002000 ffffea00006a0708 ffffea00006a0708 0000000000000000 raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner info is not present (never set?) Memory state around the buggy address: ffffffff9a81c180: 00 00 f9 f9 00 00 f9 f9 00 00 f9 f9 00 00 f9 f9 ffffffff9a81c200: 00 00 f9 f9 00 00 00 00 00 00 00 00 00 00 00 00 >ffffffff9a81c280: 00 00 f9 f9 00 00 f9 f9 00 00 f9 f9 00 00 f9 f9 ^ ffffffff9a81c300: 00 00 f9 f9 00 00 f9 f9 00 00 00 00 00 00 00 00 ffffffff9a81c380: 00 00 f9 f9 00 00 f9 f9 00 00 f9 f9 00 00 f9 f9 ================================================================== ---------------- Code disassembly (best guess): 0: 9c pushf 1: 8f 44 24 20 pop 0x20(%rsp) 5: 42 80 3c 23 00 cmpb $0x0,(%rbx,%r12,1) a: 74 08 je 0x14 c: 4c 89 f7 mov %r14,%rdi f: e8 2e e4 2d f6 call 0xf62de442 14: f6 44 24 21 02 testb $0x2,0x21(%rsp) 19: 75 52 jne 0x6d 1b: 41 f7 c7 00 02 00 00 test $0x200,%r15d 22: 74 01 je 0x25 24: fb sti 25: bf 01 00 00 00 mov $0x1,%edi * 2a: e8 63 8b 95 f5 call 0xf5958b92 <-- trapping instruction 2f: 65 8b 05 94 b8 0b 74 mov %gs:0x740bb894(%rip),%eax # 0x740bb8ca 36: 85 c0 test %eax,%eax 38: 74 43 je 0x7d 3a: 48 rex.W 3b: c7 .byte 0xc7 3c: 04 24 add $0x24,%al 3e: 0e (bad) 3f: 36 ss