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]
Date:   Tue, 26 Jan 2021 16:24:26 +0100
From:   Maxime Ripard <maxime@...no.tech>
To:     Linus Walleij <linus.walleij@...aro.org>
Cc:     liu xiang <liu.xiang@...ngsmart.com>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        Chen-Yu Tsai <wens@...e.org>,
        Jernej Skrabec <jernej.skrabec@...l.net>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        liuxiang_1999 <liuxiang_1999@....com>
Subject: Re: [PATCH] pinctrl: sunxi: fix use-after-free in sunxi_pmx_free()

On Tue, Jan 26, 2021 at 04:03:29PM +0100, Linus Walleij wrote:
> On Tue, Jan 26, 2021 at 7:31 AM liu xiang <liu.xiang@...ngsmart.com> wrote:
> 
> > > Liu can you make a patch to Kconfig to just select REGULATOR?
> > > Possibly even the specific regulator driver this SoC is using
> > > if it is very specific for this purpose.
> >
> > I found that the regulator driver is related to the specific board, not the SoC.
> > There is no board config for ARM64 SoC like ARM.
> > Is a good idea to select the regulator driver in the pinctrl Konfig? Or just
> > select CONFIG_REGULATOR_FIXED_VOLTAGE to avoid the use-after-free warning?
> 
> If that regulator is what the board uses to satisfy this driver then that
> is what you should select. Write some blurb in the commit message
> about what is going on.
> 
> You can even add a comment in Kconfig like that:
> 
> # Needed to provide power to rails
> select REGULATOR_FIXED_VOLTAGE

Virtually all the boards will need a regulator, but you can't make the
assumption that this is the driver that is going to be used. In most
case, it isn't.

But it's not really a big deal, we depend on the framework itself being
enabled for regulator_get to return the proper error, not one given
driver.

Maxime

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ