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: <CACRpkdbWR68xv6a96Nt6mXhrMZaEVT=ejMvqm=TPYngEo6C3RA@mail.gmail.com>
Date:   Sat, 18 Sep 2021 01:35:09 +0200
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Heiko Stuebner <heiko@...ech.de>
Cc:     Bartosz Golaszewski <bgolaszewski@...libre.com>,
        Jianqun Xu <jay.xu@...k-chips.com>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        "open list:ARM/Rockchip SoC..." <linux-rockchip@...ts.infradead.org>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/4] pinctrl/rockchip: add a queue for deferred pin output
 settings on probe

On Tue, Sep 14, 2021 at 12:49 AM Heiko Stuebner <heiko@...ech.de> wrote:

> The separation of pinctrl and gpio drivers created a tiny window where
> a pinconfig setting might produce a null-pointer dereference.
>
> The affected device were rk3288-veyron devices in this case.
>
> Pinctrl-hogs are claimed when the pinctrl driver is registered,
> at which point their pinconfig settings will be applied.
> At this time the now separate gpio devices will not have been created
> yet and the matching driver won't have probed yet, making the gpio->foo()
> call run into a null-ptr.
>
> As probing is not really guaranteed to have been completed at a specific
> time, introduce a queue that can hold the output settings until the gpio
> driver has probed and will (in a separate patch) fetch the elements
> of the list.
>
> We expect the gpio driver to empty the list, but will nevertheless empty
> it ourself on remove if that didn't happen.
>
> Fixes: 9ce9a02039de ("pinctrl/rockchip: drop the gpio related codes")
> Signed-off-by: Heiko Stuebner <heiko@...ech.de>

Hm this is not very elegant but what can we do.
Tentatively applied for fixes.

Can we not use device links to get around this?

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ