* [syzbot] [mm?] [kasan?] WARNING in __kfence_free (3)
@ 2023-10-18 2:09 syzbot
2023-10-18 9:20 ` Marco Elver
2023-11-16 4:47 ` [syzbot] [kasan?] [mm?] " syzbot
0 siblings, 2 replies; 3+ messages in thread
From: syzbot @ 2023-10-18 2:09 UTC (permalink / raw)
To: akpm, dvyukov, elver, glider, kasan-dev, linux-kernel, linux-mm,
syzkaller-bugs
Hello,
syzbot found the following issue on:
HEAD commit: 213f891525c2 Merge tag 'probes-fixes-v6.6-rc6' of git://gi..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=14a731f9680000
kernel config: https://syzkaller.appspot.com/x/.config?x=a4436b383d761e86
dashboard link: https://syzkaller.appspot.com/bug?extid=59f37b0ab4c558a5357c
compiler: aarch64-linux-gnu-gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/384ffdcca292/non_bootable_disk-213f8915.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/98b9a78b6226/vmlinux-213f8915.xz
kernel image: https://storage.googleapis.com/syzbot-assets/8ed2ef54968f/Image-213f8915.gz.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+59f37b0ab4c558a5357c@syzkaller.appspotmail.com
------------[ cut here ]------------
WARNING: CPU: 1 PID: 3252 at mm/kfence/core.c:1147 __kfence_free+0x7c/0xb4 mm/kfence/core.c:1147
Modules linked in:
CPU: 1 PID: 3252 Comm: syz-executor.1 Not tainted 6.6.0-rc6-syzkaller-00029-g213f891525c2 #0
Hardware name: linux,dummy-virt (DT)
pstate: 81400009 (Nzcv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--)
pc : __kfence_free+0x7c/0xb4 mm/kfence/core.c:1147
lr : kfence_free include/linux/kfence.h:187 [inline]
lr : __slab_free+0x48c/0x508 mm/slub.c:3614
sp : ffff800082cebb50
x29: ffff800082cebb50 x28: f7ff000002c0c400 x27: ffff8000818ca8a8
x26: ffff8000821f0620 x25: 0000000000000001 x24: ffff00007ffa3000
x23: 0000000000000001 x22: ffff00007ffa3000 x21: ffff00007ffa3000
x20: ffff80008004191c x19: fffffc0001ffe8c0 x18: ffffffffffffffff
x17: ffff800080027b40 x16: ffff800080027a34 x15: ffff800080318514
x14: ffff8000800469c8 x13: ffff800080011558 x12: ffff800081897ff4
x11: ffff800081897b28 x10: ffff800080027bfc x9 : 0000000000400cc0
x8 : ffff800082cebc30 x7 : 0000000000000000 x6 : 0000000000000000
x5 : ffff80008004191c x4 : ffff00007f869000 x3 : ffff800082420338
x2 : fcff000006a24ec0 x1 : ffff00007f8a50a0 x0 : ffff00007ffa3000
Call trace:
__kfence_free+0x7c/0xb4 mm/kfence/core.c:1147
kfence_free include/linux/kfence.h:187 [inline]
__slab_free+0x48c/0x508 mm/slub.c:3614
do_slab_free mm/slub.c:3757 [inline]
slab_free mm/slub.c:3810 [inline]
__kmem_cache_free+0x220/0x230 mm/slub.c:3822
kfree+0x5c/0x74 mm/slab_common.c:1072
kvm_uevent_notify_change.part.0+0x10c/0x174 arch/arm64/kvm/../../../virt/kvm/kvm_main.c:5908
kvm_uevent_notify_change arch/arm64/kvm/../../../virt/kvm/kvm_main.c:5878 [inline]
kvm_dev_ioctl_create_vm arch/arm64/kvm/../../../virt/kvm/kvm_main.c:5107 [inline]
kvm_dev_ioctl+0x3e8/0x91c arch/arm64/kvm/../../../virt/kvm/kvm_main.c:5131
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:871 [inline]
__se_sys_ioctl fs/ioctl.c:857 [inline]
__arm64_sys_ioctl+0xac/0xf0 fs/ioctl.c:857
__invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
invoke_syscall+0x48/0x114 arch/arm64/kernel/syscall.c:51
el0_svc_common.constprop.0+0x40/0xe0 arch/arm64/kernel/syscall.c:136
do_el0_svc+0x1c/0x28 arch/arm64/kernel/syscall.c:155
el0_svc+0x40/0x114 arch/arm64/kernel/entry-common.c:678
el0t_64_sync_handler+0x100/0x12c arch/arm64/kernel/entry-common.c:696
el0t_64_sync+0x19c/0x1a0 arch/arm64/kernel/entry.S:595
---[ end trace 0000000000000000 ]---
---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the bug is already fixed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want to overwrite bug's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the bug is a duplicate of another bug, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [syzbot] [mm?] [kasan?] WARNING in __kfence_free (3)
2023-10-18 2:09 [syzbot] [mm?] [kasan?] WARNING in __kfence_free (3) syzbot
@ 2023-10-18 9:20 ` Marco Elver
2023-11-16 4:47 ` [syzbot] [kasan?] [mm?] " syzbot
1 sibling, 0 replies; 3+ messages in thread
From: Marco Elver @ 2023-10-18 9:20 UTC (permalink / raw)
To: syzbot, Muchun Song
Cc: akpm, dvyukov, glider, kasan-dev, linux-kernel, linux-mm,
syzkaller-bugs, Andrey Konovalov
On Tue, Oct 17, 2023 at 07:09PM -0700, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 213f891525c2 Merge tag 'probes-fixes-v6.6-rc6' of git://gi..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=14a731f9680000
> kernel config: https://syzkaller.appspot.com/x/.config?x=a4436b383d761e86
> dashboard link: https://syzkaller.appspot.com/bug?extid=59f37b0ab4c558a5357c
> compiler: aarch64-linux-gnu-gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
> userspace arch: arm64
>
> Unfortunately, I don't have any reproducer for this issue yet.
>
> Downloadable assets:
> disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/384ffdcca292/non_bootable_disk-213f8915.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/98b9a78b6226/vmlinux-213f8915.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/8ed2ef54968f/Image-213f8915.gz.xz
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+59f37b0ab4c558a5357c@syzkaller.appspotmail.com
>
> ------------[ cut here ]------------
> WARNING: CPU: 1 PID: 3252 at mm/kfence/core.c:1147 __kfence_free+0x7c/0xb4 mm/kfence/core.c:1147
This has happened before:
https://lore.kernel.org/all/FC29C538-1446-4A3F-A6FA-857295D7DEB3@linux.dev/T/#u
And is this warning:
| void __kfence_free(void *addr)
| {
| struct kfence_metadata *meta = addr_to_metadata((unsigned long)addr);
|
| #ifdef CONFIG_MEMCG
| KFENCE_WARN_ON(meta->objcg); <--------
| #endif
Which is this assembly in the vmlinux provided by syzbot:
ffff8000802bed9c: 22 40 42 f9 ldr x2, [x1, #1152]
ffff8000802beda0: 02 fe ff b4 cbz x2, 0xffff8000802bed60 <__kfence_free+0x38>
ffff8000802beda4: 00 00 21 d4 brk #0x800
So we know the pointer is in x2, and from the below we know it's fcff000006a24ec0.
Muchun, last time you said:
> Maybe we could improve the warning message,
> e.g. print the current value of "meta->objcg".
Does this somehow help you better understand what's going on?
Also this is a KASAN_HW_TAGS instance (using arm64 MTE), not sure that's
relevant though.
> Modules linked in:
> CPU: 1 PID: 3252 Comm: syz-executor.1 Not tainted 6.6.0-rc6-syzkaller-00029-g213f891525c2 #0
> Hardware name: linux,dummy-virt (DT)
> pstate: 81400009 (Nzcv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--)
> pc : __kfence_free+0x7c/0xb4 mm/kfence/core.c:1147
> lr : kfence_free include/linux/kfence.h:187 [inline]
> lr : __slab_free+0x48c/0x508 mm/slub.c:3614
> sp : ffff800082cebb50
> x29: ffff800082cebb50 x28: f7ff000002c0c400 x27: ffff8000818ca8a8
> x26: ffff8000821f0620 x25: 0000000000000001 x24: ffff00007ffa3000
> x23: 0000000000000001 x22: ffff00007ffa3000 x21: ffff00007ffa3000
> x20: ffff80008004191c x19: fffffc0001ffe8c0 x18: ffffffffffffffff
> x17: ffff800080027b40 x16: ffff800080027a34 x15: ffff800080318514
> x14: ffff8000800469c8 x13: ffff800080011558 x12: ffff800081897ff4
> x11: ffff800081897b28 x10: ffff800080027bfc x9 : 0000000000400cc0
> x8 : ffff800082cebc30 x7 : 0000000000000000 x6 : 0000000000000000
> x5 : ffff80008004191c x4 : ffff00007f869000 x3 : ffff800082420338
> x2 : fcff000006a24ec0 x1 : ffff00007f8a50a0 x0 : ffff00007ffa3000
> Call trace:
> __kfence_free+0x7c/0xb4 mm/kfence/core.c:1147
> kfence_free include/linux/kfence.h:187 [inline]
> __slab_free+0x48c/0x508 mm/slub.c:3614
> do_slab_free mm/slub.c:3757 [inline]
> slab_free mm/slub.c:3810 [inline]
> __kmem_cache_free+0x220/0x230 mm/slub.c:3822
> kfree+0x5c/0x74 mm/slab_common.c:1072
> kvm_uevent_notify_change.part.0+0x10c/0x174 arch/arm64/kvm/../../../virt/kvm/kvm_main.c:5908
> kvm_uevent_notify_change arch/arm64/kvm/../../../virt/kvm/kvm_main.c:5878 [inline]
> kvm_dev_ioctl_create_vm arch/arm64/kvm/../../../virt/kvm/kvm_main.c:5107 [inline]
> kvm_dev_ioctl+0x3e8/0x91c arch/arm64/kvm/../../../virt/kvm/kvm_main.c:5131
> vfs_ioctl fs/ioctl.c:51 [inline]
> __do_sys_ioctl fs/ioctl.c:871 [inline]
> __se_sys_ioctl fs/ioctl.c:857 [inline]
> __arm64_sys_ioctl+0xac/0xf0 fs/ioctl.c:857
> __invoke_syscall arch/arm64/kernel/syscall.c:37 [inline]
> invoke_syscall+0x48/0x114 arch/arm64/kernel/syscall.c:51
> el0_svc_common.constprop.0+0x40/0xe0 arch/arm64/kernel/syscall.c:136
> do_el0_svc+0x1c/0x28 arch/arm64/kernel/syscall.c:155
> el0_svc+0x40/0x114 arch/arm64/kernel/entry-common.c:678
> el0t_64_sync_handler+0x100/0x12c arch/arm64/kernel/entry-common.c:696
> el0t_64_sync+0x19c/0x1a0 arch/arm64/kernel/entry.S:595
> ---[ end trace 0000000000000000 ]---
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [syzbot] [kasan?] [mm?] WARNING in __kfence_free (3)
2023-10-18 2:09 [syzbot] [mm?] [kasan?] WARNING in __kfence_free (3) syzbot
2023-10-18 9:20 ` Marco Elver
@ 2023-11-16 4:47 ` syzbot
1 sibling, 0 replies; 3+ messages in thread
From: syzbot @ 2023-11-16 4:47 UTC (permalink / raw)
To: akpm, andreyknvl, dvyukov, elver, glider, kasan-dev,
linux-kernel, linux-mm, muchun.song, syzkaller-bugs
syzbot has found a reproducer for the following issue on:
HEAD commit: c42d9eeef8e5 Merge tag 'hardening-v6.7-rc2' of git://git.k..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=13de8198e80000
kernel config: https://syzkaller.appspot.com/x/.config?x=65a222833c8bc575
dashboard link: https://syzkaller.appspot.com/bug?extid=59f37b0ab4c558a5357c
compiler: aarch64-linux-gnu-gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=15bd8f98e80000
Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/384ffdcca292/non_bootable_disk-c42d9eee.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/e62e8cdf4401/vmlinux-c42d9eee.xz
kernel image: https://storage.googleapis.com/syzbot-assets/d4650ef9b454/Image-c42d9eee.gz.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+59f37b0ab4c558a5357c@syzkaller.appspotmail.com
------------[ cut here ]------------
WARNING: CPU: 0 PID: 138 at mm/kfence/core.c:1147 __kfence_free+0x7c/0xb4 mm/kfence/core.c:1147
Modules linked in:
CPU: 0 PID: 138 Comm: kworker/u4:6 Not tainted 6.7.0-rc1-syzkaller-00019-gc42d9eeef8e5 #0
Hardware name: linux,dummy-virt (DT)
Workqueue: events_unbound bpf_map_free_deferred
pstate: 81400009 (Nzcv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--)
pc : __kfence_free+0x7c/0xb4 mm/kfence/core.c:1147
lr : kfence_free include/linux/kfence.h:187 [inline]
lr : __slab_free+0x48c/0x508 mm/slub.c:3614
sp : ffff800082c3bbb0
x29: ffff800082c3bbb0 x28: faff000002c03e00 x27: 0000000000000000
x26: f4ff000002c18028 x25: ffff00007ff8f138 x24: ffff00007ff8f000
x23: 0000000000000001 x22: ffff00007ff8f000 x21: ffff00007ff8f000
x20: ffff80008024297c x19: fffffc0001ffe3c0 x18: 0000000000000000
x17: 0000000000000000 x16: 0000000000000000 x15: 00000000200122aa
x14: 0000000000000273 x13: 0000000000000000 x12: 0000000000000001
x11: 0000000000000001 x10: 40fbfcfeb3055ba3 x9 : 0000000000000000
x8 : ffff800082c3bc90 x7 : 0000000000000000 x6 : 0000000000000000
x5 : ffff80008024297c x4 : ffff00007f868000 x3 : ffff8000824a02b8
x2 : f0ff000008cd7140 x1 : ffff00007f8a1350 x0 : ffff00007ff8f000
Call trace:
__kfence_free+0x7c/0xb4 mm/kfence/core.c:1147
kfence_free include/linux/kfence.h:187 [inline]
__slab_free+0x48c/0x508 mm/slub.c:3614
do_slab_free mm/slub.c:3757 [inline]
slab_free mm/slub.c:3810 [inline]
__kmem_cache_free+0x220/0x230 mm/slub.c:3822
kfree+0x5c/0x74 mm/slab_common.c:1056
kvfree+0x3c/0x4c mm/util.c:653
bpf_map_area_free+0x10/0x1c kernel/bpf/syscall.c:325
htab_map_free+0x134/0x298 kernel/bpf/hashtab.c:1556
bpf_map_free_deferred+0x44/0x60 kernel/bpf/syscall.c:701
process_one_work+0x148/0x258 kernel/workqueue.c:2630
process_scheduled_works kernel/workqueue.c:2703 [inline]
worker_thread+0x2b4/0x3cc kernel/workqueue.c:2784
kthread+0x114/0x118 kernel/kthread.c:388
ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:857
---[ end trace 0000000000000000 ]---
---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-11-16 4:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-18 2:09 [syzbot] [mm?] [kasan?] WARNING in __kfence_free (3) syzbot
2023-10-18 9:20 ` Marco Elver
2023-11-16 4:47 ` [syzbot] [kasan?] [mm?] " syzbot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.