================================================================== BUG: KASAN: use-after-free in get_disk+0xc0/0xd0 /block/genhd.c:1433 Read of size 8 at addr ffff8881c2a0f3b0 by task blkid/9611 CPU: 0 PID: 9611 Comm: blkid Not tainted 4.14.133+ #17 Call Trace: __dump_stack /lib/dump_stack.c:17 [inline] dump_stack+0xca/0x134 /lib/dump_stack.c:53 print_address_description+0x60/0x226 /mm/kasan/report.c:187 __kasan_report.cold+0x1a/0x41 /mm/kasan/report.c:316 Allocated by task 9573: save_stack /mm/kasan/common.c:76 [inline] set_track /mm/kasan/common.c:85 [inline] __kasan_kmalloc.part.0+0x53/0xc0 /mm/kasan/common.c:495 kmem_cache_alloc_node_trace /./include/linux/slab.h:378 [inline] kmalloc_node /./include/linux/slab.h:526 [inline] kzalloc_node /./include/linux/slab.h:672 [inline] alloc_disk_node+0x5b/0x3d0 /block/genhd.c:1387 0xffffffffffffffff Freed by task 9605: save_stack /mm/kasan/common.c:76 [inline] set_track /mm/kasan/common.c:85 [inline] __kasan_slab_free+0x164/0x210 /mm/kasan/common.c:457 slab_free_hook /mm/slub.c:1403 [inline] slab_free_freelist_hook /mm/slub.c:1430 [inline] slab_free /mm/slub.c:3005 [inline] kfree+0xfa/0x320 /mm/slub.c:3942 device_release+0xf4/0x1a0 /drivers/base/core.c:822 0xffffffffffffffff The buggy address belongs to the object at ffff8881c2a0ee80 which belongs to the cache kmalloc-2048 of size 2048 The buggy address is located 1328 bytes inside of 2048-byte region [ffff8881c2a0ee80, ffff8881c2a0f680) The buggy address belongs to the page: page:ffffea00070a8200 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 flags: 0x4000000000010200(slab|head) raw: 4000000000010200 0000000000000000 0000000000000000 00000001000f000f raw: ffffea0007682800 0000000200000002 ffff8881da802800 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881c2a0f280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881c2a0f300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8881c2a0f380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881c2a0f400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881c2a0f480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================