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: <zq2pmlsmmduelzniwez7hnwygx5vl2byrvtvjfabpjtvrwjcxl@eej2larvujkk>
Date: Thu, 2 Oct 2025 00:19:11 +0530
From: Brahmajit Das <listout@...tout.xyz>
To: Eduard Zingerman <eddyz87@...il.com>
Cc: syzbot+d36d5ae81e1b0a53ef58@...kaller.appspotmail.com, 
	andrii@...nel.org, ast@...nel.org, bpf@...r.kernel.org, daniel@...earbox.net, 
	haoluo@...gle.com, john.fastabend@...il.com, jolsa@...nel.org, kpsingh@...nel.org, 
	linux-kernel@...r.kernel.org, martin.lau@...ux.dev, sdf@...ichev.me, song@...nel.org, 
	syzkaller-bugs@...glegroups.com, yonghong.song@...ux.dev, kafai.wan@...ux.dev
Subject: Re: [PATCH v3 1/2] bpf: Skip scalar adjustment for BPF_NEG if dst is
 a pointer

On 01.10.2025 11:29, Eduard Zingerman wrote:
> On Wed, 2025-10-01 at 15:26 +0530, Brahmajit Das wrote:
> > In check_alu_op(), the verifier currently calls check_reg_arg() and
> > adjust_scalar_min_max_vals() unconditionally for BPF_NEG operations.
> > However, if the destination register holds a pointer, these scalar
> > adjustments are unnecessary and potentially incorrect.
> > 
> > This patch adds a check to skip the adjustment logic when the destination
> > register contains a pointer.
> > 
> > Reported-by: syzbot+d36d5ae81e1b0a53ef58@...kaller.appspotmail.com
> > Closes: https://syzkaller.appspot.com/bug?extid=d36d5ae81e1b0a53ef58
> > Fixes: aced132599b3 ("bpf: Add range tracking for BPF_NEG")
> > Suggested-by: KaFai Wan <kafai.wan@...ux.dev>
> > Signed-off-by: Brahmajit Das <listout@...tout.xyz>
> > ---
> 
> Acked-by: Eduard Zingerman <eddyz87@...il.com>
> 
Thanks
> 
> Nit: I'd made this a bit simpler: `regs[insn->dst_reg].type == SCALAR_VALUE`,
>      instead of __is_pointer_value() call.
> 
> >  			err = check_reg_arg(env, insn->dst_reg, DST_OP_NO_MARK);
> >  			err = err ?: adjust_scalar_min_max_vals(env, insn,
> >  							 &regs[insn->dst_reg],
Do I need to send a v4?

-- 
Regards,
listout

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ