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: <ac27b0cc-6ede-c7ed-19ee-2472f87f93f7@samsung.com>
Date:   Mon, 24 Aug 2020 10:38:46 +0200
From:   Marek Szyprowski <m.szyprowski@...sung.com>
To:     Dmitry Osipenko <digetx@...il.com>,
        Lee Jones <lee.jones@...aro.org>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] mfd: core: Fix double-free in
 mfd_remove_devices_fn()

Hi

On 18.08.2020 01:50, Dmitry Osipenko wrote:
> The pdev.mfd_cell is released by platform_device_release(), which is
> invoked by platform_device_unregister(). Hence mfd_remove_devices_fn()
> shouldn't release the cell variable. The double-free bug is reported KASAN
> during of MFD driver module removal.
>
> Fixes: 466a62d7642f ("mfd: core: Make a best effort attempt to match devices with the correct of_nodes")
> Signed-off-by: Dmitry Osipenko <digetx@...il.com>
> ---

I've reported that almost a week earlier and got information that it 
will be dropped:

https://lore.kernel.org/lkml/79bcd1b5-2247-5e00-7d49-2f94f9b40744@samsung.com/

https://lore.kernel.org/lkml/20200813080100.GI4354@dell/

Sadly it finally landed in v5.9-rc1. Would be nice to mention this in 
the revert:

Reported-by: Marek Szyprowski <m.szyprowski@...sung.com>

>   drivers/mfd/mfd-core.c | 2 --
>   1 file changed, 2 deletions(-)
>
> diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
> index c3651f06684f..c50718e3db58 100644
> --- a/drivers/mfd/mfd-core.c
> +++ b/drivers/mfd/mfd-core.c
> @@ -370,8 +370,6 @@ static int mfd_remove_devices_fn(struct device *dev, void *data)
>   	regulator_bulk_unregister_supply_alias(dev, cell->parent_supplies,
>   					       cell->num_parent_supplies);
>   
> -	kfree(cell);
> -
>   	platform_device_unregister(pdev);
>   	return 0;
>   }

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ