lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260104182922.971326-1-contact@arnaud-lcm.com>
Date: Sun,  4 Jan 2026 18:29:22 +0000
From: Arnaud Lecomte <contact@...aud-lcm.com>
To: syzbot+d1b7fa1092def3628bd7@...kaller.appspotmail.com
Cc: contact@...aud-lcm.com,
	linux-kernel@...r.kernel.org,
	syzkaller-bugs@...glegroups.com
Subject: #syz test

diff --git a/kernel/bpf/stackmap.c b/kernel/bpf/stackmap.c
index 2365541c81dd..b8ff4ccae2d6 100644
--- a/kernel/bpf/stackmap.c
+++ b/kernel/bpf/stackmap.c
@@ -465,7 +465,6 @@ static long __bpf_get_stack(struct pt_regs *regs, struct task_struct *task,

        if (trace_in) {
                trace = trace_in;
-               trace->nr = min_t(u32, trace->nr, max_depth);
        } else if (kernel && task) {
                trace = get_callchain_entry_for_task(task, max_depth);
        } else {
@@ -479,7 +478,8 @@ static long __bpf_get_stack(struct pt_regs *regs, struct task_struct *task,
                goto err_fault;
        }

-       trace_nr = trace->nr - skip;
+       trace_nr = min(trace->nr, max_depth);
+       trace_nr = trace_nr - skip;
        copy_len = trace_nr * elem_size;

        ips = trace->ip + skip;
--
2.43.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ