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: <cad25513-31c4-5895-cfc0-b9c7dce4ce08@redhat.com>
Date: Wed, 30 Apr 2025 21:17:01 +0200 (CEST)
From: Mikulas Patocka <mpatocka@...hat.com>
To: Dan Carpenter <dan.carpenter@...aro.org>, 
    Benjamin Marzinski <bmarzins@...hat.com>
cc: Eric Biggers <ebiggers@...nel.org>, Satya Tangirala <satyat@...gle.com>, 
    Alasdair Kergon <agk@...hat.com>, Mike Snitzer <snitzer@...nel.org>, 
    dm-devel@...ts.linux.dev, linux-kernel@...r.kernel.org, 
    kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] dm: add missing unlock on in dm_keyslot_evict()



On Wed, 30 Apr 2025, Dan Carpenter wrote:

> On Wed, Apr 30, 2025 at 09:50:37AM -0700, Eric Biggers wrote:
> > On Wed, Apr 30, 2025 at 11:05:54AM +0300, Dan Carpenter wrote:
> > > We need to call dm_put_live_table() even if dm_get_live_table() returns
> > > NULL.
> > > 
> > > Fixes: 9355a9eb21a5 ("dm: support key eviction from keyslot managers of underlying devices")
> > > Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
> > > ---
> > >  drivers/md/dm-table.c | 3 ++-
> > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > > 
> > 
> > Reviewed-by: Eric Biggers <ebiggers@...nel.org>
> > 
> > But that's an awfully error-prone API.
> 
> Yep.
> 
> > 
> > dm_blk_report_zones() gets this wrong too.
> 
> Ugh...  dm_blk_report_zones() is too weird for my static checker tool.
> The checker is looking very specifically for error paths with missing
> unlocks.

Ben already tried to fix it in dm_blk_report_zones (see the linux-dm git, 
for-next branch) - but his fix is incorrect because the "if" condition for 
dm_get_live_table and dm_put_live_table differs. I'll update his patch to 
fix this mismatch.

Mikulas

> regards,
> dan carpenter
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ