==================================================================
BUG: KASAN: slab-out-of-bounds in init_module_from_file+0x630/0x6b0
Read of size 8 at addr ffff888042f67e20 by task syz-executor.5/11693
CPU: 1 PID: 11693 Comm: syz-executor.5 Not tainted 6.4.0-next-20230630 #1
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014
Call Trace:
dump_stack_lvl+0x91/0xf0
print_report+0xcc/0x620
FAULT_INJECTION: forcing a failure.
name failslab, interval 1, probability 0, space 0, times 0
kasan_report+0xbe/0xf0
init_module_from_file+0x630/0x6b0
__x64_sys_finit_module+0xee/0x160
do_syscall_64+0x3f/0x90
entry_SYSCALL_64_after_hwframe+0x6e/0xd8
RIP: 0033:0x7f33c2ecbb19
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 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f33c0420188 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
RAX: ffffffffffffffda RBX: 00007f33c2fdf020 RCX: 00007f33c2ecbb19
RDX: 0000000000000002 RSI: 00000000200000c0 RDI: 0000000000000006
RBP: 00007f33c2f25f6d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fff6cf60cbf R14: 00007f33c0420300 R15: 0000000000022000
CPU: 0 PID: 11694 Comm: syz-executor.1 Not tainted 6.4.0-next-20230630 #1
Allocated by task 8720:
kasan_save_stack+0x22/0x50
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014
kasan_set_track+0x25/0x30
Call Trace:
__kasan_kmalloc+0x7f/0x90
__kmalloc+0x5a/0x160
dump_stack_lvl+0xc1/0xf0
ieee802_11_parse_elems_full+0xcc/0x11d0
should_fail_ex+0x4b4/0x5b0
ieee80211_ibss_rx_queued_mgmt+0xd23/0x2e70
ieee80211_iface_work+0x9bf/0xcb0
should_failslab+0x9/0x20
cfg80211_wiphy_work+0x1f7/0x290
kmem_cache_alloc+0x62/0x370
process_one_work+0xabf/0x1770
jbd2__journal_start+0x194/0x810
worker_thread+0x64f/0x12a0
__ext4_journal_start_sb+0x3d7/0x560
kthread+0x33f/0x440
__ext4_new_inode+0x2e36/0x5410
ret_from_fork+0x2c/0x50
Freed by task 8720:
kasan_save_stack+0x22/0x50
kasan_set_track+0x25/0x30
kasan_save_free_info+0x2b/0x50
ext4_mkdir+0x33e/0xb20
__kasan_slab_free+0x10a/0x190
__kmem_cache_free+0xe1/0x330
ieee80211_ibss_rx_queued_mgmt+0x1ab8/0x2e70
vfs_mkdir+0x24b/0x470
ieee80211_iface_work+0x9bf/0xcb0
do_mkdirat+0x163/0x2d0
cfg80211_wiphy_work+0x1f7/0x290
process_one_work+0xabf/0x1770
worker_thread+0x64f/0x12a0
__x64_sys_mkdir+0xf6/0x150
kthread+0x33f/0x440
do_syscall_64+0x3f/0x90
ret_from_fork+0x2c/0x50
entry_SYSCALL_64_after_hwframe+0x6e/0xd8
The buggy address belongs to the object at ffff888042f67800
which belongs to the cache kmalloc-1k of size 1024
RIP: 0033:0x7f56676b4c27
The buggy address is located 544 bytes to the right of
allocated 1024-byte region [ffff888042f67800, ffff888042f67c00)
Code: 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 53 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
The buggy address belongs to the physical page:
page:0000000057a71739 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x42f60
RSP: 002b:00007f5664c2afa8 EFLAGS: 00000246
head:0000000057a71739 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0
ORIG_RAX: 0000000000000053
flags: 0x100000000010200(slab|head|node=0|zone=1)
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f56676b4c27
page_type: 0xffffffff()
raw: 0100000000010200 ffff888008441dc0 dead000000000122 0000000000000000
RDX: 0000000000000000 RSI: 00000000000001ff RDI: 0000000020000000
raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000
RBP: 00007f5664c2b040 R08: 0000000000000000 R09: 0000000000000000
page dumped because: kasan: bad access detected
Memory state around the buggy address:
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000200000c0
ffff888042f67d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
R13: 0000000020000000 R14: 00007f5664c2b000 R15: 0000000020000180
ffff888042f67d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888042f67e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
hpet: Lost 1 RTC interrupts
^
ffff888042f67e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888042f67f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
EXT4-fs error (device sda) in __ext4_new_inode:1083: Out of memory
==================================================================
general protection fault, probably for non-canonical address 0xeac826e83f43c1fd: 0000 [#1] PREEMPT SMP KASAN NOPTI
KASAN: maybe wild-memory-access in range [0x56415741fa1e0fe8-0x56415741fa1e0fef]
CPU: 1 PID: 11693 Comm: syz-executor.5 Tainted: G B 6.4.0-next-20230630 #1
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014
RIP: 0010:init_module_from_file+0x1c1/0x6b0
Code: 0f 84 c4 01 00 00 e8 5e 36 12 00 4d 89 e7 49 83 ef 08 74 61 e8 50 36 12 00 4c 89 fa 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <80> 3c 02 00 0f 85 5d 04 00 00 4d 3b 2f 0f 84 ae 00 00 00 e8 27 36
RSP: 0018:ffff888038407d28 EFLAGS: 00010212
RAX: dffffc0000000000 RBX: 00000000000000fe RCX: ffffc900029d4000
RDX: 0ac82ae83f43c1fd RSI: ffffffff813a30f0 RDI: ffffffff810811d0
RBP: ffff88800f0f2000 R08: 0000000000000007 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000001 R12: ffff888042f67e28
R13: ffff8880446a5cc0 R14: ffffffff87b7c490 R15: 56415741fa1e0feb
FS: 00007f33c0420700(0000) GS:ffff88806cf00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020ffc10c CR3: 0000000036102000 CR4: 0000000000350ee0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600
Call Trace:
__x64_sys_finit_module+0xee/0x160
do_syscall_64+0x3f/0x90
entry_SYSCALL_64_after_hwframe+0x6e/0xd8
RIP: 0033:0x7f33c2ecbb19
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 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f33c0420188 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
RAX: ffffffffffffffda RBX: 00007f33c2fdf020 RCX: 00007f33c2ecbb19
RDX: 0000000000000002 RSI: 00000000200000c0 RDI: 0000000000000006
RBP: 00007f33c2f25f6d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fff6cf60cbf R14: 00007f33c0420300 R15: 0000000000022000
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:init_module_from_file+0x1c1/0x6b0
Code: 0f 84 c4 01 00 00 e8 5e 36 12 00 4d 89 e7 49 83 ef 08 74 61 e8 50 36 12 00 4c 89 fa 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 <80> 3c 02 00 0f 85 5d 04 00 00 4d 3b 2f 0f 84 ae 00 00 00 e8 27 36
RSP: 0018:ffff888038407d28 EFLAGS: 00010212
RAX: dffffc0000000000 RBX: 00000000000000fe RCX: ffffc900029d4000
RDX: 0ac82ae83f43c1fd RSI: ffffffff813a30f0 RDI: ffffffff810811d0
RBP: ffff88800f0f2000 R08: 0000000000000007 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000001 R12: ffff888042f67e28
R13: ffff8880446a5cc0 R14: ffffffff87b7c490 R15: 56415741fa1e0feb
FS: 00007f33c0420700(0000) GS:ffff88806cf00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020ffc10c CR3: 0000000036102000 CR4: 0000000000350ee0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600
note: syz-executor.5[11693] exited with preempt_count 1
mac80211_hwsim: wmediumd released netlink socket, switching to perfect channel medium
----------------
Code disassembly (best guess):
0: 73 01 jae 0x3
2: c3 retq
3: 48 c7 c1 bc ff ff ff mov $0xffffffffffffffbc,%rcx
a: f7 d8 neg %eax
c: 64 89 01 mov %eax,%fs:(%rcx)
f: 48 83 c8 ff or $0xffffffffffffffff,%rax
13: c3 retq
14: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1)
1b: 00 00 00
1e: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1)
23: b8 53 00 00 00 mov $0x53,%eax
28: 0f 05 syscall
* 2a: 48 3d 01 f0 ff ff cmp $0xfffffffffffff001,%rax <-- trapping instruction
30: 73 01 jae 0x33
32: c3 retq
33: 48 c7 c1 bc ff ff ff mov $0xffffffffffffffbc,%rcx
3a: f7 d8 neg %eax
3c: 64 89 01 mov %eax,%fs:(%rcx)
3f: 48 rex.W