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] [day] [month] [year] [list]
Message-ID: <0228fa73-4af2-4dd3-a607-a555afc664e9@roeck-us.net>
Date: Mon, 24 Nov 2025 11:45:36 -0800
From: Guenter Roeck <linux@...ck-us.net>
To: Gui-Dong Han <hanguidong02@...il.com>
Cc: steve.glendinning@...well.net, linux-hwmon@...r.kernel.org,
	linux-kernel@...r.kernel.org, baijiaju1990@...il.com
Subject: Re: [PATCH] hwmon: (emc2103) Add locking to avoid TOCTOU

On Tue, Nov 25, 2025 at 12:55:08AM +0800, Gui-Dong Han wrote:
> The functions fan1_input_show and fan1_target_show check shared data for
> zero before using it as a divisor. These accesses are currently
> lockless. If the data changes to zero between the check and the
> division, it causes a divide-by-zero error.
> 
> Explicitly acquire the update lock around these checks and calculations
> to ensure the data remains stable, preventing Time-of-Check to
> Time-of-Use (TOCTOU) race conditions.
> 
> Link: https://lore.kernel.org/all/CALbr=LYJ_ehtp53HXEVkSpYoub+XYSTU8Rg=o1xxMJ8=5z8B-g@mail.gmail.com/
> Signed-off-by: Gui-Dong Han <hanguidong02@...il.com>
> ---

Applied.

Thanks,
Guenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ