* [syzbot] [block?] UBSAN: shift-out-of-bounds in null_process_zoned_cmd
@ 2026-08-06 15:37 syzbot
2026-08-13 12:10 ` syzbot
` (3 more replies)
0 siblings, 4 replies; 17+ messages in thread
From: syzbot @ 2026-08-06 15:37 UTC (permalink / raw)
To: axboe, linux-block, linux-kernel, syzkaller-bugs
Hello,
syzbot found the following issue on:
HEAD commit: c21bb4193868 Merge tag 'for_linus' of git://git.kernel.org..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1218ecc6580000
kernel config: https://syzkaller.appspot.com/x/.config?x=4e38b15c29e6a1d9
dashboard link: https://syzkaller.appspot.com/bug?extid=abd6a8dca0f2b7726060
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/cf4c0f46390e/disk-c21bb419.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/21802e5d4446/vmlinux-c21bb419.xz
kernel image: https://storage.googleapis.com/syzbot-assets/6c46db810c9d/bzImage-c21bb419.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+abd6a8dca0f2b7726060@syzkaller.appspotmail.com
------------[ cut here ]------------
UBSAN: shift-out-of-bounds in drivers/block/null_blk/zoned.c:21:14
shift exponent -1 is negative
CPU: 0 UID: 0 PID: 5906 Comm: syz.0.14 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026
Call Trace:
<TASK>
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
ubsan_epilogue+0xa/0x30 lib/ubsan.c:233
__ubsan_handle_shift_out_of_bounds+0x36d/0x400 lib/ubsan.c:494
null_zone_no drivers/block/null_blk/zoned.c:21 [inline]
null_process_zoned_cmd+0xf76/0xf80 drivers/block/null_blk/zoned.c:728
null_handle_cmd drivers/block/null_blk/main.c:1455 [inline]
null_queue_rq+0x8bc/0xe70 drivers/block/null_blk/main.c:1703
__blk_mq_issue_directly block/blk-mq.c:2694 [inline]
blk_mq_try_issue_directly+0x3f4/0x880 block/blk-mq.c:2754
blk_mq_submit_bio+0x20c0/0x2a40 block/blk-mq.c:3208
__submit_bio_noacct_mq block/blk-core.c:756 [inline]
submit_bio_noacct_nocheck+0x2f4/0xa40 block/blk-core.c:790
bh_submit fs/buffer.c:1239 [inline]
block_read_full_folio+0x7a6/0x810 fs/buffer.c:2463
filemap_read_folio+0x12c/0x3a0 mm/filemap.c:2510
do_read_cache_folio+0x354/0x590 mm/filemap.c:4140
read_mapping_folio include/linux/pagemap.h:1015 [inline]
read_part_sector+0xb6/0x2b0 block/partitions/core.c:724
adfspart_check_ICS+0xb1/0x960 block/partitions/acorn.c:357
check_partition block/partitions/core.c:143 [inline]
blk_add_partitions block/partitions/core.c:591 [inline]
bdev_disk_changed+0x851/0x17a0 block/partitions/core.c:695
blkdev_get_whole+0x372/0x510 block/bdev.c:751
bdev_open+0x324/0xd70 block/bdev.c:960
bdev_file_open_by_dev+0x1be/0x240 block/bdev.c:1062
disk_scan_partitions+0x1bb/0x2c0 block/genhd.c:387
add_disk_final block/genhd.c:412 [inline]
add_disk_fwnode+0x24b/0x3a0 block/genhd.c:606
add_disk include/linux/blkdev.h:800 [inline]
null_add_dev+0x130b/0x1d70 drivers/block/null_blk/main.c:2052
nullb_device_power_store+0x240/0x380 drivers/block/null_blk/main.c:501
flush_write_buffer fs/configfs/file.c:207 [inline]
configfs_write_iter+0x337/0x430 fs/configfs/file.c:229
new_sync_write fs/read_write.c:595 [inline]
vfs_write+0x612/0xba0 fs/read_write.c:687
ksys_write+0x150/0x270 fs/read_write.c:739
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f444919e0d9
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f444a0ae028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f4449425fa0 RCX: 00007f444919e0d9
RDX: 0000000000000002 RSI: 0000200000000700 RDI: 0000000000000004
RBP: 00007f4449235024 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f4449426038 R14: 00007f4449425fa0 R15: 00007ffc895cc1c8
</TASK>
---[ end trace ]---
---
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 report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [syzbot] [block?] UBSAN: shift-out-of-bounds in null_process_zoned_cmd
2026-08-06 15:37 [syzbot] [block?] UBSAN: shift-out-of-bounds in null_process_zoned_cmd syzbot
@ 2026-08-13 12:10 ` syzbot
2026-08-14 11:44 ` Niklas Cassel
2026-09-14 4:19 ` Forwarded: [PATCH] configfs: unhash dentry before dropping the item syzbot
` (2 subsequent siblings)
3 siblings, 1 reply; 17+ messages in thread
From: syzbot @ 2026-08-13 12:10 UTC (permalink / raw)
To: axboe, linux-block, linux-kernel, syzkaller-bugs
syzbot has found a reproducer for the following issue on:
HEAD commit: 3d6d817622b0 Merge tag 'scsi-fixes' of git://git.kernel.or..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1767f479580000
kernel config: https://syzkaller.appspot.com/x/.config?x=c44651ea7dd2f307
dashboard link: https://syzkaller.appspot.com/bug?extid=abd6a8dca0f2b7726060
compiler: gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16038ac6580000
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+abd6a8dca0f2b7726060@syzkaller.appspotmail.com
------------[ cut here ]------------
UBSAN: shift-out-of-bounds in drivers/block/null_blk/zoned.c:21:14
shift exponent -1 is negative
CPU: 0 UID: 0 PID: 6032 Comm: syz-executor192 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
ubsan_epilogue+0xa/0x30 lib/ubsan.c:233
__ubsan_handle_shift_out_of_bounds+0x279/0x2a0 lib/ubsan.c:494
null_zone_no drivers/block/null_blk/zoned.c:21 [inline]
null_process_zoned_cmd.cold+0x17/0x38 drivers/block/null_blk/zoned.c:728
null_handle_cmd drivers/block/null_blk/main.c:1455 [inline]
null_queue_rq+0x664/0xfb0 drivers/block/null_blk/main.c:1703
__blk_mq_issue_directly+0xe2/0x200 block/blk-mq.c:2694
blk_mq_try_issue_directly+0x21b/0x420 block/blk-mq.c:2754
blk_mq_submit_bio+0x21ec/0x3000 block/blk-mq.c:3208
__submit_bio+0x90/0x3d0 block/blk-core.c:673
__submit_bio_noacct_mq block/blk-core.c:756 [inline]
submit_bio_noacct_nocheck+0x549/0xc00 block/blk-core.c:790
submit_bio_noacct+0xd18/0x1ff0 block/blk-core.c:921
blk_crypto_submit_bio include/linux/blk-crypto.h:203 [inline]
__bh_submit+0x721/0x950 fs/buffer.c:1225
bh_submit fs/buffer.c:1239 [inline]
block_read_full_folio+0x496/0x8c0 fs/buffer.c:2463
filemap_read_folio+0xfc/0x3b0 mm/filemap.c:2516
do_read_cache_folio+0x2d7/0x6b0 mm/filemap.c:4146
read_mapping_folio include/linux/pagemap.h:1015 [inline]
read_part_sector+0xd1/0x370 block/partitions/core.c:724
adfspart_check_ICS+0x91/0x7d0 block/partitions/acorn.c:357
check_partition block/partitions/core.c:143 [inline]
blk_add_partitions block/partitions/core.c:591 [inline]
bdev_disk_changed+0x7b1/0x1260 block/partitions/core.c:695
blkdev_get_whole+0x187/0x290 block/bdev.c:751
bdev_open+0x2c7/0xe40 block/bdev.c:960
bdev_file_open_by_dev block/bdev.c:1062 [inline]
bdev_file_open_by_dev+0x179/0x210 block/bdev.c:1037
disk_scan_partitions+0x1ef/0x320 block/genhd.c:387
add_disk_final block/genhd.c:412 [inline]
add_disk_fwnode+0x3f4/0x480 block/genhd.c:606
add_disk include/linux/blkdev.h:800 [inline]
null_add_dev+0x129d/0x1df0 drivers/block/null_blk/main.c:2052
nullb_device_power_store+0x29d/0x350 drivers/block/null_blk/main.c:501
flush_write_buffer fs/configfs/file.c:207 [inline]
configfs_write_iter+0x302/0x4e0 fs/configfs/file.c:229
new_sync_write fs/read_write.c:595 [inline]
vfs_write+0x6ac/0x1050 fs/read_write.c:687
ksys_write+0x12a/0x250 fs/read_write.c:739
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x115/0x870 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fc39344769e
Code: 08 0f 85 f5 e2 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 90 41 57 41 56 4d 89 c6 41 55 4d 89 cd 41 54 55 53 48 83 ec 08
RSP: 002b:00007fc3933ea128 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007fc3933ea6c0 RCX: 00007fc39344769e
RDX: 0000000000000002 RSI: 00007fc39348c03a RDI: 0000000000000003
RBP: 0000000000000021 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: ffffffffffffffd0
R13: 0000000000000011 R14: 00007ffcdf31cc10 R15: 00007ffcdf31ccf8
</TASK>
---[ end trace ]---
---
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] 17+ messages in thread
* Re: [syzbot] [block?] UBSAN: shift-out-of-bounds in null_process_zoned_cmd
2026-08-13 12:10 ` syzbot
@ 2026-08-14 11:44 ` Niklas Cassel
0 siblings, 0 replies; 17+ messages in thread
From: Niklas Cassel @ 2026-08-14 11:44 UTC (permalink / raw)
To: syzbot; +Cc: axboe, linux-block, linux-kernel, syzkaller-bugs, dlemoal
On Thu, Aug 13, 2026 at 05:10:31AM -0700, syzbot wrote:
> syzbot has found a reproducer for the following issue on:
>
> HEAD commit: 3d6d817622b0 Merge tag 'scsi-fixes' of git://git.kernel.or..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=1767f479580000
> kernel config: https://syzkaller.appspot.com/x/.config?x=c44651ea7dd2f307
> dashboard link: https://syzkaller.appspot.com/bug?extid=abd6a8dca0f2b7726060
> compiler: gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16038ac6580000
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+abd6a8dca0f2b7726060@syzkaller.appspotmail.com
>
> ------------[ cut here ]------------
> UBSAN: shift-out-of-bounds in drivers/block/null_blk/zoned.c:21:14
> shift exponent -1 is negative
> CPU: 0 UID: 0 PID: 6032 Comm: syz-executor192 Not tainted syzkaller #0 PREEMPT(full)
> Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
> Call Trace:
> <TASK>
> __dump_stack lib/dump_stack.c:94 [inline]
> dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
> ubsan_epilogue+0xa/0x30 lib/ubsan.c:233
> __ubsan_handle_shift_out_of_bounds+0x279/0x2a0 lib/ubsan.c:494
> null_zone_no drivers/block/null_blk/zoned.c:21 [inline]
line 21:
return sect >> ilog2(dev->zone_size_sects);
ilog2() only return -1 when being supplied 0.
dev->zone_size_sects can only be 0 while dev->zoned == true,
if syzbot changed zone_size concurrently as null_add_dev() was
called.
Otherwise, the zone_size == 0 checks in null_validate_conf() and
null_init_zoned_dev() and blk_revalidate_disk_zones() would all have
returned an error.
So this suggests that it is the same problem as is solved by:
https://lore.kernel.org/linux-block/44c18098-a4ca-4c72-863e-9109251e965c@kernel.org/T/#t
Just that syzbot modified the 'zone_size' configfs attribute
concurrently as null_add_dev(), rather than 'zoned'.
Kind regards,
Niklas
^ permalink raw reply [flat|nested] 17+ messages in thread
* Forwarded: [PATCH] configfs: unhash dentry before dropping the item
2026-08-06 15:37 [syzbot] [block?] UBSAN: shift-out-of-bounds in null_process_zoned_cmd syzbot
2026-08-13 12:10 ` syzbot
@ 2026-09-14 4:19 ` syzbot
2026-09-14 4:21 ` syzbot
2026-09-14 5:06 ` syzbot
3 siblings, 0 replies; 17+ messages in thread
From: syzbot @ 2026-09-14 4:19 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: [PATCH] configfs: unhash dentry before dropping the item
Author: jchuang26@m.fudan.edu.cn
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 069f4aad347e1f3181639d2dfbadfae592df93e7
Reported-by: syzbot+abd6a8dca0f2b7726060@syzkaller.appspotmail.com
diff --git a/drivers/block/null_blk/zoned.c b/drivers/block/null_blk/zoned.c
index 384bdce6a..1c3ef902f 100644
--- a/drivers/block/null_blk/zoned.c
+++ b/drivers/block/null_blk/zoned.c
@@ -88,6 +88,11 @@ int null_init_zoned_dev(struct nullb_device *dev,
zone_capacity_sects = mb_to_sects(dev->zone_capacity);
dev_capacity_sects = mb_to_sects(dev->size);
dev->zone_size_sects = mb_to_sects(dev->zone_size);
+ if (!dev->zone_size_sects) {
+ pr_err("zone_size is too large\n");
+ return -EINVAL;
+ }
+
dev->nr_zones = round_up(dev_capacity_sects, dev->zone_size_sects)
>> ilog2(dev->zone_size_sects);
^ permalink raw reply [flat|nested] 17+ messages in thread
* Forwarded: [PATCH] configfs: unhash dentry before dropping the item
2026-08-06 15:37 [syzbot] [block?] UBSAN: shift-out-of-bounds in null_process_zoned_cmd syzbot
2026-08-13 12:10 ` syzbot
2026-09-14 4:19 ` Forwarded: [PATCH] configfs: unhash dentry before dropping the item syzbot
@ 2026-09-14 4:21 ` syzbot
2026-09-14 5:06 ` syzbot
3 siblings, 0 replies; 17+ messages in thread
From: syzbot @ 2026-09-14 4:21 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: [PATCH] configfs: unhash dentry before dropping the item
Author: jchuang26@m.fudan.edu.cn
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 069f4aad347e1f3181639d2dfbadfae592df93e7
^ permalink raw reply [flat|nested] 17+ messages in thread
* Forwarded: [PATCH] configfs: unhash dentry before dropping the item
2026-08-06 15:37 [syzbot] [block?] UBSAN: shift-out-of-bounds in null_process_zoned_cmd syzbot
` (2 preceding siblings ...)
2026-09-14 4:21 ` syzbot
@ 2026-09-14 5:06 ` syzbot
3 siblings, 0 replies; 17+ messages in thread
From: syzbot @ 2026-09-14 5:06 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: [PATCH] configfs: unhash dentry before dropping the item
Author: jchuang26@m.fudan.edu.cn
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 069f4aad347e1f3181639d2dfbadfae592df93e7
^ permalink raw reply [flat|nested] 17+ messages in thread
* Forwarded: [PATCH] configfs: unhash dentry before dropping the item
2026-09-13 13:09 [syzbot] [raid?] UBSAN: array-index-out-of-bounds in super_90_sync syzbot
@ 2026-09-14 7:44 ` syzbot
0 siblings, 0 replies; 17+ messages in thread
From: syzbot @ 2026-09-14 7:44 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: [PATCH] configfs: unhash dentry before dropping the item
Author: jchuang26@m.fudan.edu.cn
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
Reported-by: syzbot+9e3014263a35700ab49b@syzkaller.appspotmail.com
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 680b34a63..bcc32b83c 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -1393,7 +1393,11 @@ static int super_90_load(struct md_rdev *rdev, struct md_rdev *refdev, int minor
goto abort;
}
- if (sb->raid_disks <= 0)
+ /*
+ * sb->disks[] has only MD_SB_DISKS entries. A larger raid_disks
+ * count would later make super_90_sync() index past that array.
+ */
+ if (sb->raid_disks <= 0 || sb->raid_disks > MD_SB_DISKS)
goto abort;
if (md_csum_fold(calc_sb_csum(sb)) != md_csum_fold(sb->sb_csum)) {
@@ -1607,6 +1611,18 @@ static void super_90_sync(struct mddev *mddev, struct md_rdev *rdev)
struct md_rdev *rdev2;
int next_spare = mddev->raid_disks;
+ /*
+ * A 0.90 superblock has a fixed-size mdp_disk_t array and uses
+ * raid_disks as both a loop bound and the first spare disk slot.
+ * Never index sb->disks[] if an invalid raid_disks value reached
+ * us through any configuration path.
+ */
+ if (mddev->raid_disks < 0 || mddev->raid_disks > MD_SB_DISKS) {
+ pr_warn("md: %s: invalid raid_disks %d for 0.90 metadata\n",
+ mdname(mddev), mddev->raid_disks);
+ return;
+ }
+
/* make rdev->sb match mddev data..
*
* 1/ zero out disks
@@ -4448,8 +4464,19 @@ raid_disks_store(struct mddev *mddev, const char *buf, size_t len)
mddev->delta_disks = n - olddisks;
mddev->raid_disks = n;
mddev->reshape_backwards = (mddev->delta_disks < 0);
- } else
- mddev->raid_disks = n;
+ } else {
+ /*
+ * 0.90 metadata only has room for MD_SB_DISKS descriptors.
+ * Larger values would make super_90_sync() index beyond
+ * sb->disks[].
+ */
+ if ((mddev->persistent && mddev->major_version == 0 &&
+ n > MD_SB_DISKS) ||
+ (mddev->max_disks && n > mddev->max_disks))
+ err = -EINVAL;
+ else
+ mddev->raid_disks = n;
+ }
out_unlock:
memalloc_noio_restore(noio_flags);
mddev_unlock_and_resume(mddev);
@@ -7926,6 +7953,18 @@ int md_set_array_info(struct mddev *mddev, struct mdu_array_info_s *info)
mddev->ctime = ktime_get_real_seconds();
return 0;
}
+
+ /*
+ * Persistent 0.90 metadata stores disks in sb->disks[MD_SB_DISKS].
+ * A larger raid_disks count would make super_90_sync() index past
+ * that array; non-persistent arrays have no such on-disk limit.
+ */
+ if (info->raid_disks < 0 ||
+ (!info->not_persistent && info->raid_disks > MD_SB_DISKS)) {
+ pr_warn("md: invalid raid_disks %d\n", info->raid_disks);
+ return -EINVAL;
+ }
+
mddev->major_version = MD_MAJOR_VERSION;
mddev->minor_version = MD_MINOR_VERSION;
mddev->patch_version = MD_PATCHLEVEL_VERSION;
^ permalink raw reply [flat|nested] 17+ messages in thread
* Forwarded: [PATCH] configfs: unhash dentry before dropping the item
2026-09-13 2:47 [syzbot] [batman?] WARNING in batadv_iv_ogm_process_per_outif syzbot
2026-09-14 6:56 ` Forwarded: [PATCH] configfs: unhash dentry before dropping the item syzbot
@ 2026-09-14 7:10 ` syzbot
1 sibling, 0 replies; 17+ messages in thread
From: syzbot @ 2026-09-14 7:10 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: [PATCH] configfs: unhash dentry before dropping the item
Author: jchuang26@m.fudan.edu.cn
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
Reported-by: syzbot+a079f084653164a652d1@syzkaller.appspotmail.com
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c
index 53fbdbbe8..3c5f7c80b 100644
--- a/net/batman-adv/bat_iv_ogm.c
+++ b/net/batman-adv/bat_iv_ogm.c
@@ -1410,9 +1410,12 @@ batadv_iv_ogm_update_seqnos(const struct ethhdr *ethhdr,
return BATADV_NO_DUP;
orig_ifinfo = batadv_orig_ifinfo_new(orig_node, if_outgoing);
- if (WARN_ON(!orig_ifinfo)) {
+ /* batadv_orig_ifinfo_new() can fail when the memory allocation fails.
+ * This is not a bug, so don't warn and treat the OGM as non-duplicate.
+ */
+ if (!orig_ifinfo) {
batadv_orig_node_put(orig_node);
- return 0;
+ return BATADV_NO_DUP;
}
spin_lock_bh(&orig_node->bat_iv.ogm_cnt_lock);
^ permalink raw reply [flat|nested] 17+ messages in thread
* Forwarded: [PATCH] configfs: unhash dentry before dropping the item
2026-09-13 2:47 [syzbot] [batman?] WARNING in batadv_iv_ogm_process_per_outif syzbot
@ 2026-09-14 6:56 ` syzbot
2026-09-14 7:10 ` syzbot
1 sibling, 0 replies; 17+ messages in thread
From: syzbot @ 2026-09-14 6:56 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: [PATCH] configfs: unhash dentry before dropping the item
Author: jchuang26@m.fudan.edu.cn
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 50d05c7c76c96b90462f24debacca971d2e86713
Reported-by: syzbot+a079f084653164a652d1@syzkaller.appspotmail.com
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c
index 53fbdbbe8..3c5f7c80b 100644
--- a/net/batman-adv/bat_iv_ogm.c
+++ b/net/batman-adv/bat_iv_ogm.c
@@ -1410,9 +1410,12 @@ batadv_iv_ogm_update_seqnos(const struct ethhdr *ethhdr,
return BATADV_NO_DUP;
orig_ifinfo = batadv_orig_ifinfo_new(orig_node, if_outgoing);
- if (WARN_ON(!orig_ifinfo)) {
+ /* batadv_orig_ifinfo_new() can fail when the memory allocation fails.
+ * This is not a bug, so don't warn and treat the OGM as non-duplicate.
+ */
+ if (!orig_ifinfo) {
batadv_orig_node_put(orig_node);
- return 0;
+ return BATADV_NO_DUP;
}
spin_lock_bh(&orig_node->bat_iv.ogm_cnt_lock);
^ permalink raw reply [flat|nested] 17+ messages in thread
* Forwarded: [PATCH] configfs: unhash dentry before dropping the item
2026-08-01 0:44 [syzbot] [usb?] UBSAN: array-index-out-of-bounds in uea_bind syzbot
2026-09-14 5:48 ` Forwarded: [PATCH] configfs: unhash dentry before dropping the item syzbot
@ 2026-09-14 5:49 ` syzbot
1 sibling, 0 replies; 17+ messages in thread
From: syzbot @ 2026-09-14 5:49 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: [PATCH] configfs: unhash dentry before dropping the item
Author: jchuang26@m.fudan.edu.cn
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 762137ff748fa0c920f82ce718163691cb02f907
Reported-by: syzbot+92f5bf49bf4ac75223ca@syzkaller.appspotmail.com
diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c
index 4266a0cb7..b1b358b3a 100644
--- a/drivers/usb/atm/ueagle-atm.c
+++ b/drivers/usb/atm/ueagle-atm.c
@@ -2458,12 +2458,21 @@ static int uea_bind(struct usbatm_data *usbatm, struct usb_interface *intf,
struct uea_softc *sc;
int ret, ifnum = intf->altsetting->desc.bInterfaceNumber;
unsigned int alt;
+ int modem_idx;
/* interface 0 is for firmware/monitoring */
if (ifnum != UEA_INTR_IFACE_NO)
return -ENODEV;
- usbatm->flags = (sync_wait[modem_index] ? 0 : UDSL_SKIP_HEAVY_INIT);
+ /*
+ * modem_index is a global counter that stops at NB_MODEM once that
+ * many devices have been probed. Wrap the index the same way as
+ * sc->modem_index below so that the module parameter lookup stays
+ * within the bounds of the arrays.
+ */
+ modem_idx = (modem_index < NB_MODEM) ? modem_index : 0;
+
+ usbatm->flags = (sync_wait[modem_idx] ? 0 : UDSL_SKIP_HEAVY_INIT);
/* interface 1 is for outbound traffic */
ret = claim_interface(usb, usbatm, UEA_US_IFACE_NO);
^ permalink raw reply [flat|nested] 17+ messages in thread
* Forwarded: [PATCH] configfs: unhash dentry before dropping the item
2026-08-01 0:44 [syzbot] [usb?] UBSAN: array-index-out-of-bounds in uea_bind syzbot
@ 2026-09-14 5:48 ` syzbot
2026-09-14 5:49 ` syzbot
1 sibling, 0 replies; 17+ messages in thread
From: syzbot @ 2026-09-14 5:48 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: [PATCH] configfs: unhash dentry before dropping the item
Author: jchuang26@m.fudan.edu.cn
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 762137ff748fa0c920f82ce718163691cb02f907
^ permalink raw reply [flat|nested] 17+ messages in thread
* Forwarded: [PATCH] configfs: unhash dentry before dropping the item
2026-07-30 0:19 [syzbot] [fs?] KASAN: slab-use-after-free Write in config_item_get syzbot
` (2 preceding siblings ...)
2026-09-11 11:55 ` syzbot
@ 2026-09-14 1:38 ` syzbot
3 siblings, 0 replies; 17+ messages in thread
From: syzbot @ 2026-09-14 1:38 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: [PATCH] configfs: unhash dentry before dropping the item
Author: jchuang26@m.fudan.edu.cn
#syz test: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a7c1290eef60711c10289c056ad32ed1f2b47b12
^ permalink raw reply [flat|nested] 17+ messages in thread
* Forwarded: [PATCH] configfs: unhash dentry before dropping the item
2026-08-16 15:10 [syzbot] [kernel?] BUG: unable to handle kernel paging request in cirrus_primary_plane_helper_atomic_update syzbot
2026-09-13 9:04 ` Forwarded: [PATCH] configfs: unhash dentry before dropping the item syzbot
@ 2026-09-14 1:12 ` syzbot
1 sibling, 0 replies; 17+ messages in thread
From: syzbot @ 2026-09-14 1:12 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: [PATCH] configfs: unhash dentry before dropping the item
Author: jchuang26@m.fudan.edu.cn
#syz test: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 958f35cbb8955ca3fa439cd9f2092cb42414aa8c
^ permalink raw reply [flat|nested] 17+ messages in thread
* Forwarded: [PATCH] configfs: unhash dentry before dropping the item
2026-08-16 15:10 [syzbot] [kernel?] BUG: unable to handle kernel paging request in cirrus_primary_plane_helper_atomic_update syzbot
@ 2026-09-13 9:04 ` syzbot
2026-09-14 1:12 ` syzbot
1 sibling, 0 replies; 17+ messages in thread
From: syzbot @ 2026-09-13 9:04 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: [PATCH] configfs: unhash dentry before dropping the item
Author: jchuang26@m.fudan.edu.cn
#syz test: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 958f35cbb8955ca3fa439cd9f2092cb42414aa8c
Reported-by: syzbot+2442951a6abb004df963@syzkaller.appspotmail.com
diff --git a/drivers/gpu/drm/tiny/cirrus-qemu.c b/drivers/gpu/drm/tiny/cirrus-qemu.c
index 075221b43..f66e33f18 100644
--- a/drivers/gpu/drm/tiny/cirrus-qemu.c
+++ b/drivers/gpu/drm/tiny/cirrus-qemu.c
@@ -68,6 +68,7 @@ struct cirrus_device {
/* HW resources */
void __iomem *vram;
+ resource_size_t vram_size;
void __iomem *mmio;
};
@@ -298,6 +299,7 @@ static const uint64_t cirrus_primary_plane_format_modifiers[] = {
static int cirrus_primary_plane_helper_atomic_check(struct drm_plane *plane,
struct drm_atomic_commit *state)
{
+ struct cirrus_device *cirrus = to_cirrus(plane->dev);
struct drm_plane_state *new_plane_state = drm_atomic_get_new_plane_state(state, plane);
struct drm_framebuffer *fb = new_plane_state->fb;
struct drm_crtc *new_crtc = new_plane_state->crtc;
@@ -319,7 +321,7 @@ static int cirrus_primary_plane_helper_atomic_check(struct drm_plane *plane,
/* validate size constraints */
if (fb->pitches[0] > CIRRUS_MAX_PITCH)
return -EINVAL;
- else if (fb->pitches[0] > CIRRUS_VRAM_SIZE / fb->height)
+ else if (fb->pitches[0] > cirrus->vram_size / fb->height)
return -EINVAL;
return 0;
@@ -514,6 +516,7 @@ static int cirrus_pipe_init(struct cirrus_device *cirrus)
static enum drm_mode_status cirrus_mode_config_mode_valid(struct drm_device *dev,
const struct drm_display_mode *mode)
{
+ struct cirrus_device *cirrus = to_cirrus(dev);
const struct drm_format_info *format = drm_format_info(DRM_FORMAT_XRGB8888);
u64 pitch;
@@ -525,7 +528,7 @@ static enum drm_mode_status cirrus_mode_config_mode_valid(struct drm_device *dev
return MODE_BAD_WIDTH;
if (pitch > CIRRUS_MAX_PITCH)
return MODE_BAD_WIDTH; /* maximum programmable pitch */
- if (pitch > CIRRUS_VRAM_SIZE / mode->vdisplay)
+ if (pitch > cirrus->vram_size / mode->vdisplay)
return MODE_MEM;
return MODE_OK;
@@ -602,8 +605,10 @@ static int cirrus_pci_probe(struct pci_dev *pdev,
dev = &cirrus->dev;
+ cirrus->vram_size = min_t(resource_size_t, pci_resource_len(pdev, 0),
+ CIRRUS_VRAM_SIZE);
cirrus->vram = devm_ioremap(&pdev->dev, pci_resource_start(pdev, 0),
- pci_resource_len(pdev, 0));
+ cirrus->vram_size);
if (cirrus->vram == NULL)
return -ENOMEM;
^ permalink raw reply [flat|nested] 17+ messages in thread
* Forwarded: [PATCH] configfs: unhash dentry before dropping the item
2026-07-30 0:19 [syzbot] [fs?] KASAN: slab-use-after-free Write in config_item_get syzbot
2026-09-10 12:24 ` Forwarded: [PATCH] configfs: unhash dentry before dropping the item syzbot
2026-09-11 8:15 ` syzbot
@ 2026-09-11 11:55 ` syzbot
2026-09-14 1:38 ` syzbot
3 siblings, 0 replies; 17+ messages in thread
From: syzbot @ 2026-09-11 11:55 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: [PATCH] configfs: unhash dentry before dropping the item
Author: jchuang26@m.fudan.edu.cn
#syz test: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a7c1290eef60711c10289c056ad32ed1f2b47b12
Reported-by: syzbot+6b16e3d085833cbf3e25@syzkaller.appspotmail.com
diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c
index 3c88f13f1..d9c222ff0 100644
--- a/fs/configfs/dir.c
+++ b/fs/configfs/dir.c
@@ -418,6 +418,16 @@ static void configfs_remove_dir(struct dentry *d)
pr_warn("remove_dir (%pd): attributes remain", d);
}
+ /*
+ * The dentry can still have external references (e.g. from a
+ * concurrent configfs_symlink() path lookup), in which case
+ * simple_rmdir() will not have unhashed it yet. Make sure the
+ * dentry is unreachable before the caller drops the last
+ * reference to the config_item, since configfs_symlink() resolves
+ * targets by taking a reference through a hashed dentry.
+ */
+ d_drop(d);
+
pr_debug(" o %pd removing done (%d)\n", d, d_count(d));
dput(parent);
^ permalink raw reply [flat|nested] 17+ messages in thread
* Forwarded: [PATCH] configfs: unhash dentry before dropping the item
2026-07-30 0:19 [syzbot] [fs?] KASAN: slab-use-after-free Write in config_item_get syzbot
2026-09-10 12:24 ` Forwarded: [PATCH] configfs: unhash dentry before dropping the item syzbot
@ 2026-09-11 8:15 ` syzbot
2026-09-11 11:55 ` syzbot
2026-09-14 1:38 ` syzbot
3 siblings, 0 replies; 17+ messages in thread
From: syzbot @ 2026-09-11 8:15 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: [PATCH] configfs: unhash dentry before dropping the item
Author: jchuang26@m.fudan.edu.cn
#syz test: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a7c1290eef60711c10289c056ad32ed1f2b47b12
Reported-by: syzbot+6b16e3d085833cbf3e25@syzkaller.appspotmail.com
diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c
index 3c88f13f1..b0812432f 100644
--- a/fs/configfs/dir.c
+++ b/fs/configfs/dir.c
@@ -1552,12 +1552,14 @@ static int configfs_rmdir(struct inode *dir, struct dentry *dentry)
if (sd->s_type & CONFIGFS_USET_DIR) {
configfs_detach_group(dentry);
+ d_drop(dentry);
mutex_lock(&subsys->su_mutex);
client_disconnect_notify(parent_item, item);
unlink_group(to_config_group(item));
} else {
configfs_detach_item(dentry);
+ d_drop(dentry);
mutex_lock(&subsys->su_mutex);
client_disconnect_notify(parent_item, item);
^ permalink raw reply [flat|nested] 17+ messages in thread
* Forwarded: [PATCH] configfs: unhash dentry before dropping the item
2026-07-30 0:19 [syzbot] [fs?] KASAN: slab-use-after-free Write in config_item_get syzbot
@ 2026-09-10 12:24 ` syzbot
2026-09-11 8:15 ` syzbot
` (2 subsequent siblings)
3 siblings, 0 replies; 17+ messages in thread
From: syzbot @ 2026-09-10 12:24 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: [PATCH] configfs: unhash dentry before dropping the item
Author: alsowereme@outlook.com
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a7c1290eef60711c10289c056ad32ed1f2b47b12
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2026-09-14 7:44 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-06 15:37 [syzbot] [block?] UBSAN: shift-out-of-bounds in null_process_zoned_cmd syzbot
2026-08-13 12:10 ` syzbot
2026-08-14 11:44 ` Niklas Cassel
2026-09-14 4:19 ` Forwarded: [PATCH] configfs: unhash dentry before dropping the item syzbot
2026-09-14 4:21 ` syzbot
2026-09-14 5:06 ` syzbot
-- strict thread matches above, loose matches on Subject: below --
2026-09-13 13:09 [syzbot] [raid?] UBSAN: array-index-out-of-bounds in super_90_sync syzbot
2026-09-14 7:44 ` Forwarded: [PATCH] configfs: unhash dentry before dropping the item syzbot
2026-09-13 2:47 [syzbot] [batman?] WARNING in batadv_iv_ogm_process_per_outif syzbot
2026-09-14 6:56 ` Forwarded: [PATCH] configfs: unhash dentry before dropping the item syzbot
2026-09-14 7:10 ` syzbot
2026-08-16 15:10 [syzbot] [kernel?] BUG: unable to handle kernel paging request in cirrus_primary_plane_helper_atomic_update syzbot
2026-09-13 9:04 ` Forwarded: [PATCH] configfs: unhash dentry before dropping the item syzbot
2026-09-14 1:12 ` syzbot
2026-08-01 0:44 [syzbot] [usb?] UBSAN: array-index-out-of-bounds in uea_bind syzbot
2026-09-14 5:48 ` Forwarded: [PATCH] configfs: unhash dentry before dropping the item syzbot
2026-09-14 5:49 ` syzbot
2026-07-30 0:19 [syzbot] [fs?] KASAN: slab-use-after-free Write in config_item_get syzbot
2026-09-10 12:24 ` Forwarded: [PATCH] configfs: unhash dentry before dropping the item syzbot
2026-09-11 8:15 ` syzbot
2026-09-11 11:55 ` syzbot
2026-09-14 1:38 ` syzbot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®