* [syzbot] [batman?] WARNING in batadv_iv_ogm_process_per_outif
@ 2026-09-13 2:47 syzbot
2026-09-13 3:21 ` Forwarded: [PATCH] batman-adv: avoid WARN_ON for orig_ifinfo allocation failure syzbot
` (5 more replies)
0 siblings, 6 replies; 19+ messages in thread
From: syzbot @ 2026-09-13 2:47 UTC (permalink / raw)
To: antonio, b.a.t.m.a.n, linux-kernel, marek.lindner, netdev, sven,
sw, syzkaller-bugs
Hello,
syzbot found the following issue on:
HEAD commit: 50d05c7c76c9 Merge tag 'landlock-7.3-rc3' of git://git.ker..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=170ef749580000
kernel config: https://syzkaller.appspot.com/x/.config?x=5e4e3a0e188a497e
dashboard link: https://syzkaller.appspot.com/bug?extid=a079f084653164a652d1
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
userspace arch: i386
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=108ef749580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=16b696f9580000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/daf497619736/disk-50d05c7c.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/748fbd82f647/vmlinux-50d05c7c.xz
kernel image: https://storage.googleapis.com/syzbot-assets/e61c59099d07/bzImage-50d05c7c.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+a079f084653164a652d1@syzkaller.appspotmail.com
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
</TASK>
------------[ cut here ]------------
!orig_ifinfo
WARNING: net/batman-adv/bat_iv_ogm.c:1413 at batadv_iv_ogm_update_seqnos net/batman-adv/bat_iv_ogm.c:1413 [inline], CPU#1: syz.1.17/5794
WARNING: net/batman-adv/bat_iv_ogm.c:1413 at batadv_iv_ogm_process_per_outif+0x1fe4/0x25c0 net/batman-adv/bat_iv_ogm.c:1550, CPU#1: syz.1.17/5794
Modules linked in:
CPU: 1 UID: 0 PID: 5794 Comm: syz.1.17 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026
RIP: 0010:batadv_iv_ogm_update_seqnos net/batman-adv/bat_iv_ogm.c:1413 [inline]
RIP: 0010:batadv_iv_ogm_process_per_outif+0x1fe4/0x25c0 net/batman-adv/bat_iv_ogm.c:1550
Code: ff ff e8 af ad 1c f6 49 bc 00 00 00 00 00 fc ff df e9 80 f4 ff ff e8 9b ad 1c f6 90 0f 0b 90 e9 47 e1 ff ff e8 8d ad 1c f6 90 <0f> 0b 90 48 8b bc 24 80 00 00 00 e8 6c df ff ff 48 c7 44 24 50 00
RSP: 0018:ffffc900030e7280 EFLAGS: 00010293
RAX: ffffffff8bab1d03 RBX: ffff888078df0a00 RCX: ffff88802efc3e80
RDX: 0000000000000000 RSI: ffffffff8e475f59 RDI: ffffffff8c6d9a80
RBP: ffffc900030e7410 R08: ffffffff907a2b7f R09: 1ffffffff20f456f
R10: dffffc0000000000 R11: fffffbfff20f4570 R12: dffffc0000000000
R13: 0000000002020000 R14: ffff88802bce4000 R15: ffff888078df0a00
FS: 0000000000000000(0000) GS:ffff888124dd2000(0063) knlGS:000000005807c480
CS: 0010 DS: 002b ES: 002b CR0: 0000000080050033
CR2: 00000000f7153200 CR3: 000000007a636000 CR4: 00000000003526f0
Call Trace:
<TASK>
batadv_iv_ogm_process net/batman-adv/bat_iv_ogm.c:1866 [inline]
batadv_iv_ogm_receive+0xc13/0x1740 net/batman-adv/bat_iv_ogm.c:1974
batadv_batman_skb_recv+0x4b6/0x870 net/batman-adv/main.c:529
__netif_receive_skb_one_core net/core/dev.c:6264 [inline]
__netif_receive_skb net/core/dev.c:6377 [inline]
netif_receive_skb_internal net/core/dev.c:6463 [inline]
netif_receive_skb+0x4af/0xbf0 net/core/dev.c:6522
tun_rx_batched+0x1de/0x790 drivers/net/tun.c:1571
tun_get_user+0x2be0/0x44d0 drivers/net/tun.c:2045
tun_chr_write_iter+0x113/0x200 drivers/net/tun.c:2091
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_32_irqs_on arch/x86/entry/syscall_32.c:79 [inline]
__do_fast_syscall_32+0x27a/0x6a0 arch/x86/entry/syscall_32.c:291
do_fast_syscall_32+0x33/0x70 arch/x86/entry/syscall_32.c:316
entry_SYSENTER_compat_after_hwframe+0x84/0x8e
RIP: 0023:0xf7f480ec
Code: 90 85 d2 74 0a 89 ce 81 e6 ff 0f 00 00 89 32 85 c0 74 05 c1 e9 0c 89 08 31 c0 5e 5d c3 90 0f 1f 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 58 b8
RSP: 002b:00000000f752fa5c EFLAGS: 00000206 ORIG_RAX: 0000000000000004
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000080000800
RDX: 0000000000000026 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
</TASK>
----------------
Code disassembly (best guess):
0: 90 nop
1: 85 d2 test %edx,%edx
3: 74 0a je 0xf
5: 89 ce mov %ecx,%esi
7: 81 e6 ff 0f 00 00 and $0xfff,%esi
d: 89 32 mov %esi,(%rdx)
f: 85 c0 test %eax,%eax
11: 74 05 je 0x18
13: c1 e9 0c shr $0xc,%ecx
16: 89 08 mov %ecx,(%rax)
18: 31 c0 xor %eax,%eax
1a: 5e pop %rsi
1b: 5d pop %rbp
1c: c3 ret
1d: 90 nop
1e: 0f 1f 00 nopl (%rax)
21: 51 push %rcx
22: 52 push %rdx
23: 55 push %rbp
24: 89 e5 mov %esp,%ebp
26: 0f 34 sysenter
28: cd 80 int $0x80
* 2a: 5d pop %rbp <-- trapping instruction
2b: 5a pop %rdx
2c: 59 pop %rcx
2d: c3 ret
2e: 90 nop
2f: 90 nop
30: 90 nop
31: 90 nop
32: 90 nop
33: 90 nop
34: 90 nop
35: 90 nop
36: 90 nop
37: 90 nop
38: 90 nop
39: 90 nop
3a: 90 nop
3b: 90 nop
3c: 90 nop
3d: 90 nop
3e: 58 pop %rax
3f: b8 .byte 0xb8
---
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] 19+ messages in thread
* Forwarded: [PATCH] batman-adv: avoid WARN_ON for orig_ifinfo allocation failure
2026-09-13 2:47 [syzbot] [batman?] WARNING in batadv_iv_ogm_process_per_outif syzbot
@ 2026-09-13 3:21 ` syzbot
2026-09-13 3:21 ` syzbot
` (4 subsequent siblings)
5 siblings, 0 replies; 19+ messages in thread
From: syzbot @ 2026-09-13 3:21 UTC (permalink / raw)
To: linux-kernel, syzkaller-bugs
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.
***
Subject: [PATCH] batman-adv: avoid WARN_ON for orig_ifinfo allocation failure
Author: kartikey406@gmail.com
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
batadv_orig_ifinfo_new() returns NULL only when its GFP_ATOMIC
allocation fails, which is a normal runtime condition and not a bug.
batadv_v_ogm_forward() already handles this the same way, simply
checking for NULL without a WARN_ON.
Do the same in batadv_iv_ogm_update_seqnos() to avoid a spurious
WARN_ON splat when the allocation fails (e.g. under fault injection).
Fixes: 7351a4822d42 ("batman-adv: split out router from orig_node")
Reported-by: syzbot+a079f084653164a652d1@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=a079f084653164a652d1
Signed-off-by: Deepanshu Kartikey <kartikey406@gmail.com>
---
net/batman-adv/bat_iv_ogm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c
index 53fbdbbe8f4f..d8a6a0f64ce2 100644
--- a/net/batman-adv/bat_iv_ogm.c
+++ b/net/batman-adv/bat_iv_ogm.c
@@ -1410,7 +1410,7 @@ 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)) {
+ if (!orig_ifinfo) {
batadv_orig_node_put(orig_node);
return 0;
}
--
2.43.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* Forwarded: [PATCH] batman-adv: avoid WARN_ON for orig_ifinfo allocation failure
2026-09-13 2:47 [syzbot] [batman?] WARNING in batadv_iv_ogm_process_per_outif syzbot
2026-09-13 3:21 ` Forwarded: [PATCH] batman-adv: avoid WARN_ON for orig_ifinfo allocation failure syzbot
@ 2026-09-13 3:21 ` syzbot
2026-09-13 3:21 ` syzbot
` (3 subsequent siblings)
5 siblings, 0 replies; 19+ messages in thread
From: syzbot @ 2026-09-13 3:21 UTC (permalink / raw)
To: linux-kernel, syzkaller-bugs
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.
***
Subject: [PATCH] batman-adv: avoid WARN_ON for orig_ifinfo allocation failure
Author: kartikey406@gmail.com
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
batadv_orig_ifinfo_new() returns NULL only when its GFP_ATOMIC
allocation fails, which is a normal runtime condition and not a bug.
batadv_v_ogm_forward() already handles this the same way, simply
checking for NULL without a WARN_ON.
Do the same in batadv_iv_ogm_update_seqnos() to avoid a spurious
WARN_ON splat when the allocation fails (e.g. under fault injection).
Fixes: 7351a4822d42 ("batman-adv: split out router from orig_node")
Reported-by: syzbot+a079f084653164a652d1@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=a079f084653164a652d1
Signed-off-by: Deepanshu Kartikey <kartikey406@gmail.com>
---
net/batman-adv/bat_iv_ogm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c
index 53fbdbbe8f4f..d8a6a0f64ce2 100644
--- a/net/batman-adv/bat_iv_ogm.c
+++ b/net/batman-adv/bat_iv_ogm.c
@@ -1410,7 +1410,7 @@ 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)) {
+ if (!orig_ifinfo) {
batadv_orig_node_put(orig_node);
return 0;
}
--
2.43.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* Forwarded: [PATCH] batman-adv: avoid WARN_ON for orig_ifinfo allocation failure
2026-09-13 2:47 [syzbot] [batman?] WARNING in batadv_iv_ogm_process_per_outif syzbot
2026-09-13 3:21 ` Forwarded: [PATCH] batman-adv: avoid WARN_ON for orig_ifinfo allocation failure syzbot
2026-09-13 3:21 ` syzbot
@ 2026-09-13 3:21 ` syzbot
2026-09-14 6:56 ` Forwarded: [PATCH] configfs: unhash dentry before dropping the item syzbot
` (2 subsequent siblings)
5 siblings, 0 replies; 19+ messages in thread
From: syzbot @ 2026-09-13 3:21 UTC (permalink / raw)
To: linux-kernel, syzkaller-bugs
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.
***
Subject: [PATCH] batman-adv: avoid WARN_ON for orig_ifinfo allocation failure
Author: kartikey406@gmail.com
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
batadv_orig_ifinfo_new() returns NULL only when its GFP_ATOMIC
allocation fails, which is a normal runtime condition and not a bug.
batadv_v_ogm_forward() already handles this the same way, simply
checking for NULL without a WARN_ON.
Do the same in batadv_iv_ogm_update_seqnos() to avoid a spurious
WARN_ON splat when the allocation fails (e.g. under fault injection).
Fixes: 7351a4822d42 ("batman-adv: split out router from orig_node")
Reported-by: syzbot+a079f084653164a652d1@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=a079f084653164a652d1
Signed-off-by: Deepanshu Kartikey <kartikey406@gmail.com>
---
net/batman-adv/bat_iv_ogm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c
index 53fbdbbe8f4f..d8a6a0f64ce2 100644
--- a/net/batman-adv/bat_iv_ogm.c
+++ b/net/batman-adv/bat_iv_ogm.c
@@ -1410,7 +1410,7 @@ 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)) {
+ if (!orig_ifinfo) {
batadv_orig_node_put(orig_node);
return 0;
}
--
2.43.0
^ permalink raw reply [flat|nested] 19+ 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
` (2 preceding siblings ...)
2026-09-13 3:21 ` syzbot
@ 2026-09-14 6:56 ` syzbot
2026-09-14 7:10 ` syzbot
2026-09-14 11:39 ` Forwarded: [PATCH] WARNING in batadv_iv_ogm_process_per_outif syzbot
5 siblings, 0 replies; 19+ 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] 19+ 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
` (3 preceding siblings ...)
2026-09-14 6:56 ` Forwarded: [PATCH] configfs: unhash dentry before dropping the item syzbot
@ 2026-09-14 7:10 ` syzbot
2026-09-14 11:39 ` Forwarded: [PATCH] WARNING in batadv_iv_ogm_process_per_outif syzbot
5 siblings, 0 replies; 19+ 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] 19+ messages in thread
* Forwarded: [PATCH] WARNING in batadv_iv_ogm_process_per_outif
2026-09-13 2:47 [syzbot] [batman?] WARNING in batadv_iv_ogm_process_per_outif syzbot
` (4 preceding siblings ...)
2026-09-14 7:10 ` syzbot
@ 2026-09-14 11:39 ` syzbot
5 siblings, 0 replies; 19+ messages in thread
From: syzbot @ 2026-09-14 11:39 UTC (permalink / raw)
To: linux-kernel
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: [PATCH] WARNING in batadv_iv_ogm_process_per_outif
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..24ea350cd 100644
--- a/net/batman-adv/bat_iv_ogm.c
+++ b/net/batman-adv/bat_iv_ogm.c
@@ -1410,9 +1410,13 @@ 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)) {
+ if (!orig_ifinfo) {
+ /* The GFP_ATOMIC allocation inside batadv_orig_ifinfo_new()
+ * may fail under memory pressure. That is not a kernel bug,
+ * so don't WARN; just skip duplicate detection.
+ */
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] 19+ 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; 19+ 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] 19+ 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; 19+ 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] 19+ 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; 19+ 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] 19+ 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; 19+ 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] 19+ 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; 19+ 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] 19+ 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; 19+ 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] 19+ 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; 19+ 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] 19+ 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; 19+ 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] 19+ 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; 19+ 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] 19+ 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; 19+ 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] 19+ 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; 19+ 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] 19+ 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; 19+ 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] 19+ messages in thread
end of thread, other threads:[~2026-09-14 11:39 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-13 2:47 [syzbot] [batman?] WARNING in batadv_iv_ogm_process_per_outif syzbot
2026-09-13 3:21 ` Forwarded: [PATCH] batman-adv: avoid WARN_ON for orig_ifinfo allocation failure syzbot
2026-09-13 3:21 ` syzbot
2026-09-13 3:21 ` syzbot
2026-09-14 6:56 ` Forwarded: [PATCH] configfs: unhash dentry before dropping the item syzbot
2026-09-14 7:10 ` syzbot
2026-09-14 11:39 ` Forwarded: [PATCH] WARNING in batadv_iv_ogm_process_per_outif 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-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-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-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®