From nobody Thu Apr 9 16:32:37 2026 Received: from mail-oo1-f70.google.com (mail-oo1-f70.google.com [209.85.161.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2D7B7344D8C for ; Sat, 7 Mar 2026 05:28:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.70 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772861313; cv=none; b=fvf69T1yLTz7bZO3Y7iKf42M+1KhRiS1PKmsA1t6sMrxGcARH7zN6rPJ/AxPfUO78c0oZ8EOlN+9eH8VlE+gzWWuXoICa7RtC3XLg6qxOISaGuNPsVAp1+jQrRmUexSXWnT6qR0IokvFqfxGksbQm2wX7uUGRATog7SYgi9dqm8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772861313; c=relaxed/simple; bh=6vknnVmhfJYdsZojsu/h98I6a2o7Xc9Co3/1fIE8Z4g=; h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To: Content-Type; b=i2RipAKjIXo0eRSoRrrAJaemE41raFNoBtg0FEA0nwu4c6JUFIuCriEPqeQaEAYrA/53D7fFBO3gWkDKNsvJz/Iax6PSNn6aPFjMZ6HCHdZ+DemUm4ugnONTRmgXIMAy4tCvkAo3Gkgnp9/i17FsIzioMvPEfLp9YI0SLBD69/c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.161.70 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-oo1-f70.google.com with SMTP id 006d021491bc7-679caf7ec07so160562251eaf.1 for ; Fri, 06 Mar 2026 21:28:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772861311; x=1773466111; h=to:from:subject:message-id:in-reply-to:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6ekJvbzBkRtR8IeOdPbSEHGqTMI6WPcACu1wBM9wRKE=; b=GEMRzH8c9CyrTjhWTg7F3LZs7AAqY6iX+IwghHuDI2Zb3NaX7J2lFW7BulCweGxsPT 1tbNMixpo7fwURDv7HlSPi1eH63eLrNqi+YX7gmRXv+hwQl4hi6qlZFMW6S3fx39oYU7 c9kdZASdhWX1Y70xacD2R7zw7RHshv0yO/sQVMJkERH1gz8MyJ5gU/WicmPrxJukhGRp ExWW+/BfNHerNlo86gYeHlYiRWXIFD+2gu6pD5CN8nBaGK9SMVpGzuNovpaJcPNriBHa jGAYenNKlukEbifEfjkke85MIBMtNY4WsxnNW1CYocnvpNI7nSrTcluEuK4dSEw4WW8t 18rw== X-Gm-Message-State: AOJu0YxzzB4tvJfArEJykNhiXciVXx4spYzEEIvA8mwHbNYTnLQIqzld NDzrhGvYQAnGW6hFHOrqak6/C7kCoPnOrI2reSml6mipqeO+ynEAICfzUgHgcuCQia6hs2LM2WK /5T0X/2pi3xTKYI71hSSrZxSixSBUEJrFxcHzP1swl3PAxV03RWJ2gdoZMlw= Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Received: by 2002:a05:6820:6aca:b0:663:8c6:9783 with SMTP id 006d021491bc7-67b9bd7b9d3mr2907144eaf.69.1772861311184; Fri, 06 Mar 2026 21:28:31 -0800 (PST) Date: Fri, 06 Mar 2026 21:28:31 -0800 In-Reply-To: <69a313aa.050a0220.3a55be.0042.GAE@google.com> X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <69abb77f.050a0220.13f275.003e.GAE@google.com> Subject: Forwarded: [PATCH] kernel/fork: validate exit_signal in clone() syscall From: syzbot To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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.gi= t 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=3Dbbe6b99feefc3a0842de Signed-off-by: Deepanshu Kartikey --- 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, un= signed long, newsp, .stack =3D newsp, .tls =3D tls, }; - + if (!valid_signal(args.exit_signal)) + return -EINVAL; return kernel_clone(&args); } #endif --=20 2.43.0