TITLE: KFENCE: out-of-bounds write in test_out_of_bounds_write
ALT: bad-access in test_out_of_bounds_write
TYPE: KFENCE-WRITE

[    3.980910] ==================================================================
[    3.981709] BUG: KFENCE: out-of-bounds write in test_out_of_bounds_write+0x8e/0x148
[    3.981709] 
[    3.982719] Out-of-bounds write at 0xffff8c2aae23bfff (1B left of kfence-#29):
[    3.983469]  test_out_of_bounds_write+0x8e/0x148
[    3.983955]  kunit_try_run_case+0x51/0x90
[    3.984375]  kunit_generic_run_threadfn_adapter+0x16/0x30
[    3.984938]  kthread+0x166/0x1a0
[    3.985309]  ret_from_fork+0x22/0x30
[    3.985689] 
[    3.985854] kfence-#29 [0xffff8c2aae23c000-0xffff8c2aae23c01f, size=32, cache=kmalloc-32] allocated by task 112:
[    3.986913]  test_alloc+0xf0/0x6ff
[    3.987274]  test_out_of_bounds_write+0x79/0x148
[    3.987760]  kunit_try_run_case+0x51/0x90
[    3.988181]  kunit_generic_run_threadfn_adapter+0x16/0x30
[    3.988744]  kthread+0x166/0x1a0
[    3.989086]  ret_from_fork+0x22/0x30
[    3.989469] 
[    3.989634] CPU: 5 PID: 112 Comm: kunit_try_catch Tainted: G    B             5.11.0-rc2+ #1
[    3.990505] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-2 04/01/2014
[    3.991367] RIP: 0010:test_out_of_bounds_write+0x8e/0x148
[    3.991932] Code: 4c 89 e7 45 31 ed ba c0 0c 00 00 be 20 00 00 00 e8 b9 e4 ff ff 48 89 c3 48 8d 40 ff 48 89 45 90 48 b8 01 00 00 00 5c 01 00 00 <c6> 43 ff 2a 48 89 45 a8 8b 05 7c b8 2f 01 4c 89 65 a0 48 c7 45 b0
[    3.993973] RSP: 0000:ffffa226013efe48 EFLAGS: 00010246
[    3.994609] RAX: 0000015c00000001 RBX: ffff8c2aae23c000 RCX: ffffffffa1f5add7
[    3.995473] RDX: ffff8c2783f0dd00 RSI: 0000000000000000 RDI: ffffa22600013d48
[    3.996333] RBP: ffffa226013efec8 R08: 0000000000000160 R09: ffffffffa2ccf996
[    3.997205] R10: 0000000000000017 R11: 0000000000000002 R12: ffffa22600013d48
[    3.998071] R13: 0000000000000000 R14: 0000000000000000 R15: ffffa22600013d60
[    3.998935] FS:  0000000000000000(0000) GS:ffff8c2aafd40000(0000) knlGS:0000000000000000
[    3.999912] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    4.000611] CR2: ffff8c2aae23bfff CR3: 000000034740c001 CR4: 0000000000770ee0
[    4.001499] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[    4.002359] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[    4.003219] PKRU: 55555554
[    4.003552] Call Trace:
[    4.003856]  ? test_use_after_free_read+0x143/0x143
[    4.004451]  ? preempt_count_add+0x63/0xa0
[    4.004956]  ? _raw_spin_lock_irqsave+0x14/0x40
[    4.005514]  ? test_init_on_free+0x10/0x10
[    4.006016]  kunit_try_run_case+0x51/0x90
[    4.006508]  ? kunit_try_catch_throw+0x20/0x20
[    4.007055]  kunit_generic_run_threadfn_adapter+0x16/0x30
[    4.007714]  kthread+0x166/0x1a0
[    4.008113]  ? __kthread_bind_mask+0x80/0x80
[    4.008638]  ret_from_fork+0x22/0x30
[    4.009079] ==================================================================
