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: <tencent_07A006DB31D2CB8040AF8B2C4CBBC25E7D06@qq.com>
Date: Mon, 22 Sep 2025 09:45:32 +0800
From: Haofeng Li <920484857@...com>
To: qmo@...nel.org
Cc: 13266079573@....com,
	920484857@...com,
	andrii@...nel.org,
	ast@...nel.org,
	daniel@...earbox.net,
	lihaofeng@...inos.cn,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] bpf: fix netfilter link comparison to handle unsigned flags

Thank you for your review and feedback.

>Did you actually observe an overflow producing an error when sorting, 
>here? Or did you run into some compiler warning?

I did not encounter a runtime error or a compiler warning caused by this potential overflow. 
The issue was identified during code review as a potential risk, 
considering the theoretical possibility of wrap-around with unsigned subtraction, 
which prompted me to submit this patch for code robustness.

>This being said, I don't mind making the code cleaner for these
>comparisons, but we should probably treat all three attributes the same,
>and update the rest of the function as well?

Thank you for pointing this out. 
I will prepare a v2 patch that thoroughly reviews and updates the comparison 
logic for all three fields (netfilter.pf, netfilter.hooknum, and netfilter.flags), 
replacing all subtraction-based comparisons with explicit conditional checks. 
This will ensure the entire comparison function is robust and consistent in its behavior.

Best regards,
	Haofeng Li


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ