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: <2427370.em1n7HOibB@fw-rgant>
Date: Wed, 23 Apr 2025 17:25:44 +0200
From: Romain Gantois <romain.gantois@...tlin.com>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: Tomi Valkeinen <tomi.valkeinen@...asonboard.com>,
 Luca Ceresoli <luca.ceresoli@...tlin.com>,
 Wolfram Sang <wsa+renesas@...g-engineering.com>,
 Andi Shyti <andi.shyti@...nel.org>, linux-i2c@...r.kernel.org,
 linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject:
 Re: [PATCH next] i2c: Fix end of loop test in i2c_atr_find_mapping_by_addr()

Hello Dan,

On Wednesday, 23 April 2025 10:21:18 CEST Dan Carpenter wrote:
> When the list_for_each_entry_reverse() exits without hitting a break
> then the list cursor points to invalid memory.  So this check for
> if (c2a->fixed) is checking bogus memory.  Fix it by using a "found"
> variable to track if we found what we were looking for or not.

IIUC the for loop ending condition in list_for_each_entry_reverse() is
"!list_entry_is_head(pos, head, member);", so even if the loop runs to 
completion, the pointer should still be valid right?

Thanks,

-- 
Romain Gantois, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ