WARNING in release_mtd_partition (2)

Status: upstream: reported C repro on 2025/06/24 18:50
Subsystems: mtd
[Documentation on labels]
Reported-by: syzbot+e9c76b56dc05023b8117@syzkaller.appspotmail.com
Fix commit: 9d4af746af8c mtd: fix double free and WARN_ON in add_mtd_device() error paths
Patched on: [ci-qemu-gce-upstream-auto ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-qemu2-riscv64 ci-snapshot-upstream-root ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-badwrites-root ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci-upstream-rust-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce], missing on: [ci-qemu-native-arm64-kvm ci-upstream-kmsan-gce-386-root ci-upstream-kmsan-gce-root ci2-upstream-usb]
First crash: 398d, last: 8d08h
✨ AI Jobs (9)
ID Workflow Result Correct Bug Created Started Finished Revision Error
721d40bb assessment-security 💥 WARNING in release_mtd_partition (2) 2026/07/09 02:16 2026/07/09 02:16 2026/07/09 02:17 93f57954
failed to run ["make" "KERNELVERSION=syzkaller" "KERNELRELEASE=syzkaller" "LOCALVERSION=-syzkaller" "-j" "32" "ARCH=x86_64" "CC=ccache clang" "LD=ld.lld" "O=/app/workdir/cache/build/1254c960a61d739f8a...
truncated to first 200 bytes; open job for full error
dda5dc1b patching 💥 WARNING in release_mtd_partition (2) 2026/06/24 13:27 2026/06/24 13:27 2026/06/24 13:49 2e5297c5
reproducer did not crash
a15f41d5 assessment-security 💥 WARNING in release_mtd_partition (2) 2026/06/22 04:26 2026/06/22 04:26 2026/06/22 04:28 43bfcdb0
failed to run ["make" "KERNELVERSION=syzkaller" "KERNELRELEASE=syzkaller" "LOCALVERSION=-syzkaller" "-j" "32" "ARCH=x86_64" "CC=ccache clang" "LD=ld.lld" "O=/app/workdir/cache/build/1254c960a61d739f8a...
truncated to first 200 bytes; open job for full error
22b43036 assessment-security 💥 WARNING in release_mtd_partition (2) 2026/06/14 03:36 2026/06/14 03:36 2026/06/14 03:39 4f06757f
failed to run ["make" "KERNELVERSION=syzkaller" "KERNELRELEASE=syzkaller" "LOCALVERSION=-syzkaller" "-j" "32" "ARCH=x86_64" "CC=ccache clang" "LD=ld.lld" "O=/app/workdir/cache/build/1254c960a61d739f8a...
truncated to first 200 bytes; open job for full error
6dea729f assessment-security 💥 WARNING in release_mtd_partition (2) 2026/06/09 19:18 2026/06/09 19:18 2026/06/09 19:20 c36c07f6
failed to run ["make" "KERNELVERSION=syzkaller" "KERNELRELEASE=syzkaller" "LOCALVERSION=-syzkaller" "-j" "32" "ARCH=x86_64" "CC=ccache clang" "LD=ld.lld" "O=/app/workdir/cache/build/1254c960a61d739f8a...
truncated to first 200 bytes; open job for full error
9b59a970 assessment-security 💥 WARNING in release_mtd_partition (2) 2026/06/02 22:18 2026/06/02 22:18 2026/06/02 22:21 62fe1528
failed to run ["make" "KERNELVERSION=syzkaller" "KERNELRELEASE=syzkaller" "LOCALVERSION=-syzkaller" "-j" "32" "ARCH=x86_64" "CC=ccache clang" "LD=ld.lld" "O=/app/workdir/cache/build/1254c960a61d739f8a...
truncated to first 200 bytes; open job for full error
f5f211e0 assessment-security 💥 WARNING in release_mtd_partition (2) 2026/05/30 00:35 2026/05/30 00:35 2026/05/30 00:38 6b4a8443
failed to run ["make" "KERNELVERSION=syzkaller" "KERNELRELEASE=syzkaller" "LOCALVERSION=-syzkaller" "-j" "32" "ARCH=x86_64" "CC=ccache clang" "LD=ld.lld" "O=/app/workdir/cache/build/1254c960a61d739f8a...
truncated to first 200 bytes; open job for full error
7d5b0acf patching 💥 WARNING in release_mtd_partition (2) 2026/05/08 19:59 2026/05/08 22:06 2026/05/08 22:29 4951913a
reproducer did not crash
f15f0400 patching 💥 WARNING in release_mtd_partition (2) 2026/05/08 05:09 2026/05/08 05:09 2026/05/08 05:46 5633175a
reproducer did not crash
Discussions (2)
Title Replies (including bot) Last reply
[PATCH] mtd: fix double free and WARN_ON in add_mtd_device() error paths 1 (1) 2026/07/01 12:10
[syzbot] [mtd?] WARNING in release_mtd_partition (2) 0 (1) 2025/06/24 18:50
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING in release_mtd_partition mtd -1 C 8 419d 540d 28/29 fixed on 2025/06/10 16:19
Last patch testing requests (4)
Created Duration User Patch Repo Result
2025/12/06 15:21 15m retest repro upstream report log
2025/11/05 11:34 15m retest repro upstream report log
2025/09/14 18:03 15m retest repro upstream report log
2025/07/06 17:46 14m retest repro upstream report log

Sample crash report:
RDX: 0000000000000000 RSI: 0000000000001269 RDI: 0000000000000001
RBP: 00007ffc3ddc41e0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ff2179e5fa0 R14: 00007ff2179e5fa0 R15: 0000000000000003
 </TASK>
------------[ cut here ]------------
WARNING: CPU: 0 PID: 6015 at drivers/mtd/mtdpart.c:37 release_mtd_partition+0x71/0x90 drivers/mtd/mtdpart.c:37
Modules linked in:
CPU: 0 UID: 0 PID: 6015 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025
RIP: 0010:release_mtd_partition+0x71/0x90 drivers/mtd/mtdpart.c:37
Code: 00 fc ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 75 1e 48 8b 7b 38 e8 8f 3c d7 fb 48 89 df 5b 5d e9 85 3c d7 fb e8 80 1b 7b fb 90 <0f> 0b 90 eb c2 e8 35 ad e2 fb eb db 48 89 ef e8 2b ad e2 fb eb a5
RSP: 0018:ffffc90003547830 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffff88803230c000 RCX: ffffffff8b5e1ae0
RDX: ffff888030e65ac0 RSI: ffffffff86418ce0 RDI: ffff88803230c000
RBP: ffff88803230c650 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000004 R11: 0000000000000001 R12: 0000000000000000
R13: dffffc0000000000 R14: ffff888027c31f20 R15: 0000000000000000
FS:  000055558c416500(0000) GS:ffff8881249e1000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00002000000000c0 CR3: 0000000074d26000 CR4: 00000000003526f0
Call Trace:
 <TASK>
 mtd_release+0xa0/0xd0 drivers/mtd/mtdcore.c:101
 device_release+0xa4/0x240 drivers/base/core.c:2565
 kobject_cleanup lib/kobject.c:689 [inline]
 kobject_release lib/kobject.c:720 [inline]
 kref_put include/linux/kref.h:65 [inline]
 kobject_put+0x1e7/0x5a0 lib/kobject.c:737
 put_device+0x1f/0x30 drivers/base/core.c:3797
 add_mtd_device+0xc47/0x1850 drivers/mtd/mtdcore.c:802
 mtd_add_partition+0x30c/0x670 drivers/mtd/mtdpart.c:279
 mtdchar_blkpg_ioctl+0x20b/0x250 drivers/mtd/mtdchar.c:562
 mtdchar_ioctl+0xbc4/0x2090 drivers/mtd/mtdchar.c:1216
 mtdchar_unlocked_ioctl+0xb0/0xf0 drivers/mtd/mtdchar.c:1239
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:597 [inline]
 __se_sys_ioctl fs/ioctl.c:583 [inline]
 __x64_sys_ioctl+0x18e/0x210 fs/ioctl.c:583
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xcd/0xfa0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7ff21778eec9
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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc3ddc4188 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007ff2179e5fa0 RCX: 00007ff21778eec9
RDX: 0000000000000000 RSI: 0000000000001269 RDI: 0000000000000001
RBP: 00007ffc3ddc41e0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ff2179e5fa0 R14: 00007ff2179e5fa0 R15: 0000000000000003
 </TASK>

Crashes (304):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/10/15 20:43 upstream 1f4a222b0e33 82df6b00 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto WARNING in release_mtd_partition
2025/06/22 17:45 upstream 739a6c93cc75 d6cdfb8a .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto WARNING in release_mtd_partition
2026/05/05 16:18 upstream a293ec25d59d 114c483e .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in release_mtd_partition
2026/07/01 19:59 upstream 665159e24674 5fb9973c .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto WARNING in release_mtd_partition
2026/07/01 12:11 upstream 665159e24674 00a5cf1c .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto WARNING in release_mtd_partition
2026/06/22 09:05 upstream 8cd8cf7a07e5 43bfcdb0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root WARNING in release_mtd_partition
2026/06/11 07:02 upstream 9716c086c8e8 b754d2d8 .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto WARNING in release_mtd_partition
2026/06/08 03:03 upstream 33d8d8ec31b5 cc095639 .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto WARNING in release_mtd_partition
2026/06/08 00:32 upstream 33d8d8ec31b5 cc095639 .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto WARNING in release_mtd_partition
2026/06/04 19:37 upstream ba3e43a9e601 197909be .config console log report info [disk image] [vmlinux] [kernel image] ci-qemu-gce-upstream-auto WARNING in release_mtd_partition
2026/01/18 19:18 upstream e84d960149e7 d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root WARNING in release_mtd_partition
2026/07/17 10:08 upstream fce2dfa773ce 7f27c57a .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in release_mtd_partition
2026/07/16 21:33 upstream e22254e9ddd8 6ca2b51a .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in release_mtd_partition
2026/07/12 09:03 upstream 44696aa3a489 d78ea535 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in release_mtd_partition
2026/07/10 21:01 upstream d96fcfe1b7f9 99e64375 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root WARNING in release_mtd_partition
2026/07/10 16:13 upstream a635d6748234 99e64375 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root WARNING in release_mtd_partition
2026/07/09 02:10 upstream 0e35b9b6ec0f b9f1ceaa .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in release_mtd_partition
2026/07/09 02:01 upstream 0e35b9b6ec0f b9f1ceaa .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in release_mtd_partition
2026/07/06 15:04 upstream 8cdeaa50eae8 88b240e4 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root WARNING in release_mtd_partition
2026/07/06 12:06 upstream 8cdeaa50eae8 88b240e4 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in release_mtd_partition
2026/06/28 15:21 upstream 8b69c0475871 fb92f11c .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root WARNING in release_mtd_partition
2026/06/28 03:04 upstream 780d569e6c4b fb92f11c .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in release_mtd_partition
2026/06/28 00:38 upstream 780d569e6c4b fb92f11c .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in release_mtd_partition
2026/06/21 12:31 upstream 390d73adf896 43bfcdb0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in release_mtd_partition
2026/06/21 07:08 upstream 390d73adf896 43bfcdb0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in release_mtd_partition
2026/06/20 10:28 upstream a975094bf98c 43bfcdb0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in release_mtd_partition
2026/06/20 00:47 upstream a975094bf98c 43bfcdb0 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in release_mtd_partition
2026/06/19 14:16 upstream 9ecfb2f7287a 023e42b5 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in release_mtd_partition
2026/06/19 02:31 upstream 9e7e66334583 d7ffd47b .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in release_mtd_partition
2026/06/18 06:20 upstream e771677c937d b62b3ded .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in release_mtd_partition
2026/06/17 17:48 upstream 5b33fc6492a7 b62b3ded .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in release_mtd_partition
2026/06/16 03:27 upstream 0e0611827f33 50bb0618 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in release_mtd_partition
2026/06/15 22:46 upstream 0e0611827f33 50bb0618 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in release_mtd_partition
2026/06/10 03:51 upstream 685441a6d3f1 34dab4be .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in release_mtd_partition
2026/06/09 13:16 upstream 2d3090a8aeb5 c36c07f6 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in release_mtd_partition
2026/06/09 12:59 upstream 2d3090a8aeb5 c36c07f6 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in release_mtd_partition
2026/06/06 15:11 upstream 8e65320d91cd cc095639 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in release_mtd_partition
2026/06/03 07:49 upstream ba3e43a9e601 3c0d2131 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in release_mtd_partition
2026/06/02 17:20 upstream 6f3ed7fec72f 62fe1528 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in release_mtd_partition
2026/05/30 00:27 upstream 9215e74f228f 6b4a8443 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in release_mtd_partition
2026/05/29 15:26 upstream 8fde5d1d47f6 a3d70215 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root WARNING in release_mtd_partition
2026/05/28 12:57 upstream eb3f4b7426cf 9a5a7e5e .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream WARNING in release_mtd_partition
2026/07/06 22:23 upstream 8cdeaa50eae8 88b240e4 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING in release_mtd_partition
2026/06/28 08:54 upstream 780d569e6c4b fb92f11c .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING in release_mtd_partition
2026/06/23 08:27 upstream 4708cac0e22c 5a630be6 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING in release_mtd_partition
2026/06/09 02:02 upstream 2d3090a8aeb5 656e94c6 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING in release_mtd_partition
2026/06/02 22:00 upstream 6f3ed7fec72f 62fe1528 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING in release_mtd_partition
2026/06/02 02:41 upstream e43ffb69e043 1095583b .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 WARNING in release_mtd_partition
2025/12/22 00:38 linux-next cc3aa43b44bd d6526ea3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in release_mtd_partition
2026/07/16 20:09 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a13c140cc289 8f30cfd7 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in release_mtd_partition
2026/07/14 02:48 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a13c140cc289 2130f682 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in release_mtd_partition
2026/07/11 22:58 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a52d6c7160f7 d78ea535 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in release_mtd_partition
2026/07/11 14:08 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a52d6c7160f7 d78ea535 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in release_mtd_partition
2026/07/10 15:02 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a52d6c7160f7 99e64375 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in release_mtd_partition
* Struck through repros no longer work on HEAD.