linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Kernel v4.19-rc4 KASAN complaint
@ 2018-09-18 21:16 Bart Van Assche
  2018-09-20  7:10 ` Christoph Hellwig
  2018-09-20 17:01 ` Keith Busch
  0 siblings, 2 replies; 19+ messages in thread
From: Bart Van Assche @ 2018-09-18 21:16 UTC (permalink / raw)


Hello,

If I run the nvmeof-mp tests from https://github.com/bvanassche/blktests 
against kernel v4.19-rc4 then a KASAN complaint appears. This complaint 
does not appear when I run these tests against kernel v4.18. Could this 
be a regression?

Thanks,

Bart.

BUG: KASAN: use-after-free in srcu_invoke_callbacks+0x207/0x290
Read of size 8 at addr ffff880074250f70 by task kworker/0:3/26033

CPU: 0 PID: 26033 Comm: kworker/0:3 Not tainted 4.19.0-rc4-dbg+ #1
Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
Workqueue: rcu_gp srcu_invoke_callbacks
Call Trace:
dump_stack+0xa4/0xf5
print_address_description+0x78/0x290
kasan_report+0x241/0x360
__asan_load8+0x54/0x90
srcu_invoke_callbacks+0x207/0x290
process_one_work+0x4ae/0xa20
worker_thread+0x63/0x5a0
kthread+0x1cf/0x1f0
ret_from_fork+0x24/0x30

Allocated by task 24735:
save_stack+0x43/0xd0
kasan_kmalloc+0xad/0xe0
kmem_cache_alloc_trace+0x13d/0x300
nvme_validate_ns+0x8e9/0x1020 [nvme_core]
nvme_scan_work+0x3be/0x4a0 [nvme_core]
process_one_work+0x4ae/0xa20
worker_thread+0x63/0x5a0
kthread+0x1cf/0x1f0
ret_from_fork+0x24/0x30

Freed by task 17790:
save_stack+0x43/0xd0
__kasan_slab_free+0x135/0x190
kasan_slab_free+0xe/0x10
kfree+0x105/0x2e0
nvme_free_ns+0x160/0x1a0 [nvme_core]
nvme_ns_remove+0x1ba/0x250 [nvme_core]
nvme_remove_invalid_namespaces+0x1d9/0x220 [nvme_core]
nvme_scan_work+0x43b/0x4a0 [nvme_core]
process_one_work+0x4ae/0xa20
worker_thread+0x63/0x5a0
kthread+0x1cf/0x1f0
ret_from_fork+0x24/0x30

The buggy address belongs to the object at ffff880074250d80
which belongs to the cache kmalloc-1024 of size 1024
The buggy address is located 496 bytes inside of
1024-byte region [ffff880074250d80, ffff880074251180)
The buggy address belongs to the page:
page:ffffea0001d09400 count:1 mapcount:0 mapping:ffff88011bf8ea00 
index:0x0 compound_mapcount: 0
flags: 0x4000000000008100(slab|head)
raw: 4000000000008100 ffffea0003587a00 0000000200000002 ffff88011bf8ea00
raw: 0000000000000000 00000000001c001c 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
ffff880074250e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff880074250e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 >ffff880074250f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                                             ^
ffff880074250f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff880074251000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2018-10-17 17:32 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20181006170915.GS2674@linux.ibm.com>
     [not found] ` <31b80bc0-afc6-6bd9-c722-302f538d3e5b@lge.com>
2018-10-08  6:11   ` Kernel v4.19-rc4 KASAN complaint Byungchul Park
2018-10-08 10:13     ` Christoph Hellwig
2018-09-18 21:16 Bart Van Assche
2018-09-20  7:10 ` Christoph Hellwig
2018-09-20 17:24   ` Bart Van Assche
2018-09-25 23:32     ` Christoph Hellwig
2018-09-26  3:14       ` Paul E. McKenney
2018-10-05  7:38         ` Christoph Hellwig
2018-10-17  6:39           ` Christoph Hellwig
2018-10-17 14:38             ` Bart Van Assche
2018-10-17 17:32             ` Bart Van Assche
2018-09-24  4:27   ` Sagi Grimberg
2018-09-24 14:04     ` Bart Van Assche
2018-09-20 17:01 ` Keith Busch
2018-09-20 17:31   ` Bart Van Assche
2018-09-20 17:36     ` Keith Busch
2018-10-05  7:34       ` Christoph Hellwig
2018-09-20 17:36     ` Bart Van Assche
2018-09-20 17:45       ` Keith Busch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).