* [syzbot] [fs?] KASAN: slab-use-after-free Write in config_item_get
@ 2026-07-30 0:19 syzbot
2026-09-10 12:24 ` Forwarded: [PATCH] configfs: unhash dentry before dropping the item syzbot
` (3 more replies)
0 siblings, 4 replies; 15+ messages in thread
From: syzbot @ 2026-07-30 0:19 UTC (permalink / raw)
To: a.hindborg, leitao, linux-fsdevel, linux-kernel, syzkaller-bugs
Hello,
syzbot found the following issue on:
HEAD commit: fc02acf6ac0c Merge tag 'platform-drivers-x86-v7.2-4' of gi..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1220b1b9580000
kernel config: https://syzkaller.appspot.com/x/.config?x=cb17729fb04b1e3a
dashboard link: https://syzkaller.appspot.com/bug?extid=6b16e3d085833cbf3e25
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=121ea49e580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1620b1b9580000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/b3bff1d63ddf/disk-fc02acf6.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/04efa97b7fb6/vmlinux-fc02acf6.xz
kernel image: https://storage.googleapis.com/syzbot-assets/be724b7ea80c/bzImage-fc02acf6.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+6b16e3d085833cbf3e25@syzkaller.appspotmail.com
==================================================================
BUG: KASAN: slab-use-after-free in instrument_atomic_read_write include/linux/instrumented.h:112 [inline]
BUG: KASAN: slab-use-after-free in atomic_fetch_add_relaxed include/linux/atomic/atomic-instrumented.h:252 [inline]
BUG: KASAN: slab-use-after-free in __refcount_add include/linux/refcount.h:283 [inline]
BUG: KASAN: slab-use-after-free in __refcount_inc include/linux/refcount.h:366 [inline]
BUG: KASAN: slab-use-after-free in refcount_inc include/linux/refcount.h:383 [inline]
BUG: KASAN: slab-use-after-free in kref_get include/linux/kref.h:45 [inline]
BUG: KASAN: slab-use-after-free in config_item_get+0x26/0x90 fs/configfs/item.c:104
Write of size 4 at addr ffff888039f5201c by task syz.3.408/6784
CPU: 1 UID: 0 PID: 6784 Comm: syz.3.408 Not tainted syzkaller #0 PREEMPT_{RT,(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
print_address_description+0x55/0x1e0 mm/kasan/report.c:378
print_report+0x58/0x70 mm/kasan/report.c:482
kasan_report+0x117/0x150 mm/kasan/report.c:595
check_region_inline mm/kasan/generic.c:-1 [inline]
kasan_check_range+0x264/0x2c0 mm/kasan/generic.c:200
instrument_atomic_read_write include/linux/instrumented.h:112 [inline]
atomic_fetch_add_relaxed include/linux/atomic/atomic-instrumented.h:252 [inline]
__refcount_add include/linux/refcount.h:283 [inline]
__refcount_inc include/linux/refcount.h:366 [inline]
refcount_inc include/linux/refcount.h:383 [inline]
kref_get include/linux/kref.h:45 [inline]
config_item_get+0x26/0x90 fs/configfs/item.c:104
configfs_get_config_item fs/configfs/configfs_internal.h:127 [inline]
get_target fs/configfs/symlink.c:128 [inline]
configfs_symlink+0x4ab/0x1030 fs/configfs/symlink.c:185
vfs_symlink+0x18b/0x330 fs/namei.c:5660
filename_symlinkat+0x1cd/0x420 fs/namei.c:5685
__do_sys_symlinkat fs/namei.c:5705 [inline]
__se_sys_symlinkat+0x4e/0x2b0 fs/namei.c:5700
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:0x7f98f891de99
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:00007f98f7f7e028 EFLAGS: 00000246 ORIG_RAX: 000000000000010a
RAX: ffffffffffffffda RBX: 00007f98f8ba5fa0 RCX: 00007f98f891de99
RDX: 0000200000000340 RSI: ffffffffffffff9c RDI: 0000200000000300
RBP: 00007f98f89b3eaf R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f98f8ba6038 R14: 00007f98f8ba5fa0 R15: 00007ffce9af1ce8
</TASK>
Allocated by task 6785:
kasan_save_stack mm/kasan/common.c:57 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
poison_kmalloc_redzone mm/kasan/common.c:398 [inline]
__kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:415
kasan_kmalloc include/linux/kasan.h:263 [inline]
__kmalloc_cache_noprof+0x3d2/0x6b0 mm/slub.c:5489
_kmalloc_noprof include/linux/slab.h:988 [inline]
_kzalloc_noprof include/linux/slab.h:1309 [inline]
afunc_alloc_inst+0x4c/0x770 drivers/usb/gadget/function/f_uac2.c:2192
try_get_usb_function_instance drivers/usb/gadget/functions.c:28 [inline]
usb_get_function_instance+0xe3/0x2f0 drivers/usb/gadget/functions.c:44
function_make+0x127/0x360 drivers/usb/gadget/configfs.c:626
configfs_mkdir+0x4f6/0x9e0 fs/configfs/dir.c:1360
vfs_mkdir+0x402/0x620 fs/namei.c:5276
filename_mkdirat+0x289/0x520 fs/namei.c:5309
__do_sys_mkdirat fs/namei.c:5330 [inline]
__se_sys_mkdirat+0x35/0x150 fs/namei.c:5327
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
The buggy address belongs to the object at ffff888039f52000
which belongs to the cache kmalloc-2k of size 2048
The buggy address is located 28 bytes inside of
freed 2048-byte region [ffff888039f52000, ffff888039f52800)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888039f50000 pfn:0x39f50
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0x80000000000240(workingset|head|node=0|zone=1)
page_type: f5(slab)
raw: 0080000000000240 ffff88813ffb2000 ffffea0000d6de10 ffffea0000f10610
raw: ffff888039f50000 0000000800080005 00000000f5000000 0000000000000000
head: 0080000000000240 ffff88813ffb2000 ffffea0000d6de10 ffffea0000f10610
head: ffff888039f50000 0000000800080005 00000000f5000000 0000000000000000
head: 0080000000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff
head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000008
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5743, tgid 5743 (syz-executor), ts 119768577290, free_ts 119599127308
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1859
prep_new_page mm/page_alloc.c:1867 [inline]
get_page_from_freelist+0x262a/0x26a0 mm/page_alloc.c:3946
__alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5304
alloc_slab_page mm/slub.c:3266 [inline]
allocate_slab+0x79/0x5e0 mm/slub.c:3380
new_slab mm/slub.c:3426 [inline]
refill_objects+0x2d8/0x350 mm/slub.c:7310
refill_sheaf mm/slub.c:2804 [inline]
__pcs_replace_empty_main+0x330/0x690 mm/slub.c:4675
alloc_from_pcs mm/slub.c:4773 [inline]
slab_alloc_node mm/slub.c:4905 [inline]
__kmalloc_cache_noprof+0x468/0x6b0 mm/slub.c:5485
_kmalloc_noprof include/linux/slab.h:988 [inline]
_kzalloc_noprof include/linux/slab.h:1309 [inline]
batadv_hardif_add_interface net/batman-adv/hard-interface.c:878 [inline]
batadv_hard_if_event+0x282a/0x3530 net/batman-adv/hard-interface.c:1087
notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85
call_netdevice_notifiers_extack net/core/dev.c:2288 [inline]
call_netdevice_notifiers net/core/dev.c:2302 [inline]
register_netdevice+0x18c0/0x1ed0 net/core/dev.c:11484
nsim_init_netdevsim drivers/net/netdevsim/netdev.c:1070 [inline]
nsim_create+0xbe9/0x1160 drivers/net/netdevsim/netdev.c:1152
__nsim_dev_port_add+0x7f8/0xcd0 drivers/net/netdevsim/dev.c:1509
nsim_dev_port_add_all+0x37/0xf0 drivers/net/netdevsim/dev.c:1570
nsim_drv_probe+0x8d6/0xc00 drivers/net/netdevsim/dev.c:1731
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x254/0xae0 drivers/base/dd.c:706
__driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868
page last free pid 5908 tgid 5908 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
__free_pages_prepare mm/page_alloc.c:1406 [inline]
__free_frozen_pages+0x10e7/0x11c0 mm/page_alloc.c:2950
__slab_free+0x252/0x2a0 mm/slub.c:5741
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x99/0x100 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:350
kasan_slab_alloc include/linux/kasan.h:253 [inline]
slab_post_alloc_hook mm/slub.c:4584 [inline]
slab_alloc_node mm/slub.c:4917 [inline]
kmem_cache_alloc_noprof+0x355/0x650 mm/slub.c:4931
vm_area_alloc+0x24/0x140 mm/vma_init.c:32
__mmap_new_vma mm/vma.c:2547 [inline]
__mmap_region mm/vma.c:2774 [inline]
mmap_region+0x1263/0x2310 mm/vma.c:2860
do_mmap+0xc1e/0x10b0 mm/mmap.c:560
vm_mmap_pgoff+0x275/0x4e0 mm/util.c:581
ksys_mmap_pgoff+0x4a6/0x720 mm/mmap.c:606
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
Memory state around the buggy address:
ffff888039f51f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888039f51f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888039f52000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888039f52080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888039f52100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
---
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 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.
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] 15+ 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; 15+ 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] 15+ 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; 15+ 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] 15+ 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; 15+ 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] 15+ 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; 15+ 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] 15+ 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; 15+ 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] 15+ 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; 15+ 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] 15+ 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; 15+ 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] 15+ 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; 15+ 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] 15+ 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; 15+ 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] 15+ 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-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
2 siblings, 0 replies; 15+ 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] 15+ 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-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
2 siblings, 0 replies; 15+ 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] 15+ 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-09-14 4:19 ` syzbot
2026-09-14 4:21 ` syzbot
2026-09-14 5:06 ` syzbot
2 siblings, 0 replies; 15+ 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] 15+ 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; 15+ 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] 15+ 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; 15+ 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] 15+ messages in thread
end of thread, other threads:[~2026-09-14 7:44 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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-08-06 15:37 [syzbot] [block?] UBSAN: shift-out-of-bounds in null_process_zoned_cmd 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
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-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-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
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®