public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [syzbot] [kernel?] WARNING in do_notify_parent
@ 2026-02-28 16:11 syzbot
  2026-03-03  6:21 ` syzbot
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: syzbot @ 2026-02-28 16:11 UTC (permalink / raw)
  To: linux-kernel, syzkaller-bugs

Hello,

syzbot found the following issue on:

HEAD commit:    3fa5e5702a82 Add linux-next specific files for 20260227
git tree:       linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=16ca68d6580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=4791940d55a6241f
dashboard link: https://syzkaller.appspot.com/bug?extid=bbe6b99feefc3a0842de
compiler:       Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/68faadb8e3e6/disk-3fa5e570.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/4244d0610a6a/vmlinux-3fa5e570.xz
kernel image: https://storage.googleapis.com/syzbot-assets/f95b76890c87/bzImage-3fa5e570.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+bbe6b99feefc3a0842de@syzkaller.appspotmail.com

------------[ cut here ]------------
!valid_signal(sig)
WARNING: kernel/signal.c:2174 at do_notify_parent+0xc7e/0xd70 kernel/signal.c:2174, CPU#1: syz.1.1187/9757
Modules linked in:
CPU: 1 UID: 0 PID: 9757 Comm: syz.1.1187 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
RIP: 0010:do_notify_parent+0xc7e/0xd70 kernel/signal.c:2174
Code: c6 05 c4 e5 92 0e 01 48 c7 c7 c0 46 cb 8b be a3 08 00 00 48 c7 c2 40 48 cb 8b e8 ed 52 17 00 e9 c6 fa ff ff e8 23 1f 3b 00 90 <0f> 0b 90 45 31 e4 e9 1c ff ff ff e8 12 1f 3b 00 90 0f 0b 90 e9 75
RSP: 0018:ffffc90003f17c40 EFLAGS: 00010093
RAX: ffffffff818ad72d RBX: dffffc0000000000 RCX: ffff888035061e80
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 0000000000000040
RBP: ffffc90003f17d90 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffff520007e2fa4 R12: ffff88802eba8010
R13: ffff888035061e80 R14: 0000000000000080 R15: 1ffff920007e2f90
FS:  0000000000000000(0000) GS:ffff888125102000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007faf66e52770 CR3: 000000002cc0a000 CR4: 00000000003526f0
DR0: 0000000000000007 DR1: 0000000000010005 DR2: 000000000000000f
DR3: 0000000000007fff DR6: 00000000ffff0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 exit_notify kernel/exit.c:756 [inline]
 do_exit+0x13f1/0x23c0 kernel/exit.c:986
 __do_sys_exit kernel/exit.c:1083 [inline]
 __se_sys_exit kernel/exit.c:1081 [inline]
 __x64_sys_exit+0x40/0x40 kernel/exit.c:1081
 x64_sys_call+0x2231/0x2240 arch/x86/include/generated/asm/syscalls_64.h:61
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7faf66f9c799
Code: Unable to access opcode bytes at 0x7faf66f9c76f.
RSP: 002b:0000200000002818 EFLAGS: 00000246 ORIG_RAX: 000000000000003c
RAX: ffffffffffffffda RBX: 000000000000000b RCX: 00007faf66f9c799
RDX: 00007faf66f9c799 RSI: 0000200000002840 RDI: 000000000000000b
RBP: 00007faf67032bd9 R08: 0000200000002e80 R09: e32a5aa294094ac1
R10: 0000200000002e80 R11: 0000000000000246 R12: 0000000000000000
R13: 00007faf67216038 R14: 00007faf67215fa0 R15: 00007ffe4e1e4898
 </TASK>


---
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] 6+ messages in thread

* Re: [syzbot] [kernel?] WARNING in do_notify_parent
  2026-02-28 16:11 [syzbot] [kernel?] WARNING in do_notify_parent syzbot
@ 2026-03-03  6:21 ` syzbot
  2026-03-07  5:28 ` Forwarded: [PATCH] kernel/fork: validate exit_signal in clone() syscall syzbot
  2026-03-16  8:21 ` Forwarded: [PATCH] kernel/fork: validate exit_signal in kernel_clone() syzbot
  2 siblings, 0 replies; 6+ messages in thread
From: syzbot @ 2026-03-03  6:21 UTC (permalink / raw)
  To: linux-kernel, syzkaller-bugs

syzbot has found a reproducer for the following issue on:

HEAD commit:    d517cb8cea01 Add linux-next specific files for 20260302
git tree:       linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=14051006580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=18bb611e9b1de188
dashboard link: https://syzkaller.appspot.com/bug?extid=bbe6b99feefc3a0842de
compiler:       Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=1214b0ba580000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=10e16202580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/3fd9d51aa9e4/disk-d517cb8c.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/fcada8d480c1/vmlinux-d517cb8c.xz
kernel image: https://storage.googleapis.com/syzbot-assets/a4509a43a01d/bzImage-d517cb8c.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+bbe6b99feefc3a0842de@syzkaller.appspotmail.com

------------[ cut here ]------------
!valid_signal(sig)
WARNING: kernel/signal.c:2174 at do_notify_parent+0xc7e/0xd70 kernel/signal.c:2174, CPU#0: syz.0.17/6060
Modules linked in:
CPU: 0 UID: 0 PID: 6060 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
RIP: 0010:do_notify_parent+0xc7e/0xd70 kernel/signal.c:2174
Code: c6 05 2c 05 93 0e 01 48 c7 c7 c0 46 cb 8b be a3 08 00 00 48 c7 c2 40 48 cb 8b e8 6d 53 17 00 e9 c6 fa ff ff e8 a3 00 3b 00 90 <0f> 0b 90 45 31 e4 e9 1c ff ff ff e8 92 00 3b 00 90 0f 0b 90 e9 75
RSP: 0018:ffffc90003467c40 EFLAGS: 00010093
RAX: ffffffff818aed2d RBX: dffffc0000000000 RCX: ffff888030320000
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 0000000000000040
RBP: ffffc90003467d90 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffff5200068cfa4 R12: ffff888026cf9d10
R13: ffff888030320000 R14: 0000000000000080 R15: 1ffff9200068cf90
FS:  0000000000000000(0000) GS:ffff888124ff7000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f4ff1052770 CR3: 0000000077786000 CR4: 00000000003526f0
Call Trace:
 <TASK>
 exit_notify kernel/exit.c:756 [inline]
 do_exit+0x15b3/0x2580 kernel/exit.c:986
 __do_sys_exit kernel/exit.c:1083 [inline]
 __se_sys_exit kernel/exit.c:1081 [inline]
 __x64_sys_exit+0x40/0x40 kernel/exit.c:1081
 x64_sys_call+0x2231/0x2240 arch/x86/include/generated/asm/syscalls_64.h:61
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f4ff119c799
Code: Unable to access opcode bytes at 0x7f4ff119c76f.
RSP: 002b:0000200000000d98 EFLAGS: 00000246 ORIG_RAX: 000000000000003c
RAX: ffffffffffffffda RBX: 000000000000000b RCX: 00007f4ff119c799
RDX: 00007f4ff119c799 RSI: 0000200000000dc0 RDI: 000000000000000b
RBP: 00007f4ff1232bd9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f4ff1415fac R14: 00007f4ff1415fa0 R15: 00007f4ff1415fa0
 </TASK>


---
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] 6+ messages in thread

* Forwarded: [PATCH] kernel/fork: validate exit_signal in clone() syscall
  2026-02-28 16:11 [syzbot] [kernel?] WARNING in do_notify_parent syzbot
  2026-03-03  6:21 ` syzbot
@ 2026-03-07  5:28 ` syzbot
  2026-03-16  8:21 ` Forwarded: [PATCH] kernel/fork: validate exit_signal in kernel_clone() syzbot
  2 siblings, 0 replies; 6+ messages in thread
From: syzbot @ 2026-03-07  5:28 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] kernel/fork: validate exit_signal in clone() syscall
Author: kartikey406@gmail.com

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master


The clone() syscall constructs exit_signal as:

  (lower_32_bits(clone_flags) & CSIGNAL)

CSIGNAL is 0xff, so values in the range 65-255 are possible.
However, valid_signal() only accepts signals up to _NSIG (64 on
x86_64). This allows a userspace process to store an invalid
exit_signal in task_struct->exit_signal, which later triggers a
WARN_ON(!valid_signal(sig)) in do_notify_parent() when the process
exits:

  WARNING: kernel/signal.c:2174 do_notify_parent+0xc7e/0xd70

The comment above kernel_clone() states that callers are expected
to validate exit_signal before calling kernel_clone(). clone3()
correctly does this:

  if (unlikely((args.exit_signal & ~((u64)CSIGNAL)) ||
               !valid_signal(args.exit_signal)))
          return -EINVAL;

The clone() syscall has no such check. Add the missing
valid_signal() check to the clone() syscall handler, consistent
with the existing validation in clone3().

Reported-by: syzbot+bbe6b99feefc3a0842de@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=bbe6b99feefc3a0842de
Signed-off-by: Deepanshu Kartikey <Kartikey406@gmail.com>
---
 kernel/fork.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/fork.c b/kernel/fork.c
index 947a8dbce06a..dbe26ac6ca10 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -2845,7 +2845,8 @@ SYSCALL_DEFINE5(clone, unsigned long, clone_flags, unsigned long, newsp,
 		.stack		= newsp,
 		.tls		= tls,
 	};
-
+	if (!valid_signal(args.exit_signal))
+		return -EINVAL;
 	return kernel_clone(&args);
 }
 #endif
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [syzbot] [kernel?] WARNING in do_notify_parent
       [not found] <20260307052823.351759-1-kartikey406@gmail.com>
@ 2026-03-07  5:53 ` syzbot
  0 siblings, 0 replies; 6+ messages in thread
From: syzbot @ 2026-03-07  5:53 UTC (permalink / raw)
  To: kartikey406, linux-kernel, syzkaller-bugs

Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-by: syzbot+bbe6b99feefc3a0842de@syzkaller.appspotmail.com
Tested-by: syzbot+bbe6b99feefc3a0842de@syzkaller.appspotmail.com

Tested on:

commit:         a0ae2a25 Add linux-next specific files for 20260306
git tree:       linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=113e88ba580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=e4ba3386f27401fd
dashboard link: https://syzkaller.appspot.com/bug?extid=bbe6b99feefc3a0842de
compiler:       Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
patch:          https://syzkaller.appspot.com/x/patch.diff?x=14c8db5a580000

Note: testing is done by a robot and is best-effort only.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Forwarded: [PATCH] kernel/fork: validate exit_signal in kernel_clone()
  2026-02-28 16:11 [syzbot] [kernel?] WARNING in do_notify_parent syzbot
  2026-03-03  6:21 ` syzbot
  2026-03-07  5:28 ` Forwarded: [PATCH] kernel/fork: validate exit_signal in clone() syscall syzbot
@ 2026-03-16  8:21 ` syzbot
  2 siblings, 0 replies; 6+ messages in thread
From: syzbot @ 2026-03-16  8: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] kernel/fork: validate exit_signal in kernel_clone()
Author: kartikey406@gmail.com

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master


When a child process exits, it sends exit_signal to its parent via
do_notify_parent(). The clone() syscall constructs exit_signal as:

  (lower_32_bits(clone_flags) & CSIGNAL)

CSIGNAL is 0xff, so values in the range 65-255 are possible. However,
valid_signal() only accepts signals up to _NSIG (64 on x86_64), causing
a WARN_ON in do_notify_parent() when the process exits:

  WARNING: kernel/signal.c:2174 do_notify_parent+0xc7e/0xd70

The syzkaller reproducer triggers this by calling clone() with
flags=0x80, resulting in exit_signal = (0x80 & CSIGNAL) = 128, which
exceeds _NSIG and is not a valid signal.

The v1 of this patch added the check only in the clone() syscall
handler, which is incomplete. kernel_clone() has other callers such
as sys_ia32_clone() which would remain unprotected. Move the check
to kernel_clone() to cover all callers.

clone3() already validates exit_signal in copy_clone_args_from_user().
The comment above kernel_clone() states that callers are expected to
validate exit_signal, but several callers never did. Adding the check
to kernel_clone() enforces this for all callers centrally.

Reported-by: syzbot+bbe6b99feefc3a0842de@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=bbe6b99feefc3a0842de
Signed-off-by: Deepanshu Kartikey <Kartikey406@gmail.com>
---
 kernel/fork.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/fork.c b/kernel/fork.c
index 947a8dbce06a..89d7eb67baf5 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -2687,6 +2687,8 @@ pid_t kernel_clone(struct kernel_clone_args *args)
 	    (args->pidfd == args->parent_tid))
 		return -EINVAL;
 
+	if (!valid_signal(args->exit_signal))
+		return -EINVAL;
 	/*
 	 * Determine whether and which event to report to ptracer.  When
 	 * called from kernel_thread or CLONE_UNTRACED is explicitly
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [syzbot] [kernel?] WARNING in do_notify_parent
       [not found] <20260316082100.554362-1-kartikey406@gmail.com>
@ 2026-03-16  9:23 ` syzbot
  0 siblings, 0 replies; 6+ messages in thread
From: syzbot @ 2026-03-16  9:23 UTC (permalink / raw)
  To: kartikey406, linux-kernel, syzkaller-bugs

Hello,

syzbot has tested the proposed patch and the reproducer did not trigger any issue:

Reported-by: syzbot+bbe6b99feefc3a0842de@syzkaller.appspotmail.com
Tested-by: syzbot+bbe6b99feefc3a0842de@syzkaller.appspotmail.com

Tested on:

commit:         b84a0ebe Add linux-next specific files for 20260313
git tree:       linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=14bc3406580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=1927ed86ca830812
dashboard link: https://syzkaller.appspot.com/bug?extid=bbe6b99feefc3a0842de
compiler:       Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
patch:          https://syzkaller.appspot.com/x/patch.diff?x=171e28da580000

Note: testing is done by a robot and is best-effort only.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-03-16  9:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-28 16:11 [syzbot] [kernel?] WARNING in do_notify_parent syzbot
2026-03-03  6:21 ` syzbot
2026-03-07  5:28 ` Forwarded: [PATCH] kernel/fork: validate exit_signal in clone() syscall syzbot
2026-03-16  8:21 ` Forwarded: [PATCH] kernel/fork: validate exit_signal in kernel_clone() syzbot
     [not found] <20260307052823.351759-1-kartikey406@gmail.com>
2026-03-07  5:53 ` [syzbot] [kernel?] WARNING in do_notify_parent syzbot
     [not found] <20260316082100.554362-1-kartikey406@gmail.com>
2026-03-16  9:23 ` syzbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox