From nobody Thu Jan 8 00:14:31 2026 Received: from plesk.hostmyservers.fr (plesk.hostmyservers.fr [45.145.164.37]) (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 43E7A1DF980 for ; Sun, 4 Jan 2026 18:30:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.145.164.37 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767551431; cv=none; b=K/KtIzhUoQ7IKfo3e1SZbv6lEIzyg9SPhrJYC04JLHm5I5//7e9e484aAuo+8JSy7wUnxwwl/uLXilOIPW/iOZx+3mMrhvTGBkKyRnx7eq1DDKR9KaOR1VQeBIGEzcTnr1lvBT3Vcm2GdJp3V31kE5zcOkw6uk0FhdjGoKE1/DQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767551431; c=relaxed/simple; bh=TGIIAxnydgW8TL5LXFbpw20ashXiLplejmgSmcQIkw4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kX2+4vr4lkz6VhG0fiwcsO8O7fDNkg8UQnTgaRH8ksMo49gckUCvRssRKbuLARX65zhlbmeIiggsRQfFJqz6wzkeg5uTuyrDrJP7AcIFUnNEeOf2A/Q+s3gVLgT5Mh2+en8L71RGMalWfPy+0GgoHpx4wyYjV4Vmyj0Javv+KSM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=arnaud-lcm.com; spf=pass smtp.mailfrom=arnaud-lcm.com; arc=none smtp.client-ip=45.145.164.37 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=arnaud-lcm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arnaud-lcm.com Received: from localhost.localdomain (vps-f4c04b7b.vps.ovh.net [IPv6:2001:41d0:305:2100::d563]) by plesk.hostmyservers.fr (Postfix) with ESMTPSA id 0329F410C7; Sun, 4 Jan 2026 18:30:26 +0000 (UTC) Authentication-Results: Plesk; spf=pass (sender IP is 2001:41d0:305:2100::d563) smtp.mailfrom=contact@arnaud-lcm.com smtp.helo=localhost.localdomain Received-SPF: pass (Plesk: connection is authenticated) From: Arnaud Lecomte To: syzbot+d1b7fa1092def3628bd7@syzkaller.appspotmail.com Cc: contact@arnaud-lcm.com, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: #syz test Date: Sun, 4 Jan 2026 18:30:19 +0000 Message-ID: <20260104183020.971360-1-contact@arnaud-lcm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <691231dc.a70a0220.22f260.0101.GAE@google.com> References: <691231dc.a70a0220.22f260.0101.GAE@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-PPP-Message-ID: <176755142633.15121.14696666788876159620@Plesk> X-PPP-Vhost: arnaud-lcm.com Content-Type: text/plain; charset="utf-8" #syz test diff --git a/kernel/bpf/stackmap.c b/kernel/bpf/stackmap.c index 2365541c81dd..b8ff4ccae2d6 100644 Reported-by: syzbot+d1b7fa1092def3628bd7@syzkaller.appspotmail.com Tested-by: syzbot+d1b7fa1092def3628bd7@syzkaller.appspotmail.com --- a/kernel/bpf/stackmap.c +++ b/kernel/bpf/stackmap.c @@ -465,7 +465,6 @@ static long __bpf_get_stack(struct pt_regs *regs, struc= t task_struct *task, if (trace_in) { trace =3D trace_in; - trace->nr =3D min_t(u32, trace->nr, max_depth); } else if (kernel && task) { trace =3D get_callchain_entry_for_task(task, max_depth); } else { @@ -479,7 +478,8 @@ static long __bpf_get_stack(struct pt_regs *regs, struc= t task_struct *task, goto err_fault; } - trace_nr =3D trace->nr - skip; + trace_nr =3D min(trace->nr, max_depth); + trace_nr =3D trace_nr - skip; copy_len =3D trace_nr * elem_size; ips =3D trace->ip + skip; -- 2.43.0