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: <20210609130816.3631f0aa@md1za8fc.ad001.siemens.net>
Date:   Wed, 9 Jun 2021 13:08:16 +0200
From:   Henning Schild <henning.schild@...mens.com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     Mika Westerberg <mika.westerberg@...ux.intel.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        Andy Shevchenko <andy@...nel.org>,
        Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [PATCH] pinctrl: intel: fix NULL pointer deref

Am Wed, 9 Jun 2021 13:33:34 +0300
schrieb Andy Shevchenko <andy.shevchenko@...il.com>:

> On Wed, Jun 9, 2021 at 1:12 PM Mika Westerberg
> <mika.westerberg@...ux.intel.com> wrote:
> > On Wed, Jun 09, 2021 at 08:27:22AM +0200, Henning Schild wrote:  
> > > match could be NULL in which case we do not go ACPI after all  
> 
> ...
> 
> > >       adev = ACPI_COMPANION(&pdev->dev);
> > > -     if (adev) {
> > > -             const void *match =
> > > device_get_match_data(&pdev->dev); -
> > > +     match = device_get_match_data(&pdev->dev);  
> >
> > Actually we don't even call intel_pinctrl_get_soc_data() if the
> > ACPI ID is not listed in the corresponding driver's module table.
> > So I don't think match can ever be NULL.
> >
> > But feel free to prove me wrong ;-)  
> 
> It's possible to have bugs in this driver, but can we see the real
> case here?

Yes that is indeed only showing when using a kernel that has seen other
patches. To be precise i applied "[rfc, PATCH v1 0/7] PCI: introduce
p2sb helper" before running into the problem. Something in there must
be calling the function without the ACPI ID.

I am still working on a series of device drivers for Siemens PCs,
adding i.e. LEDs which are in fact GPIO. Those PCs have a hidden p2sb
and no ACPI entries for the LEDs.

In order to use GPIO from the drivers i need to make sure
"broxton-pinctrl" comes up even if p2sb is hidden.

Long story short, i thought the patch was simple enough to merge even
taken out of my special context.

Currently intel_pinctl only works if "ps2b is not hidden by BIOS" or
"ACPI tables are correct", lifting the ban on the hidden p2sb seems
like a useful thing in general (i.e. sysfs gpio interface). And i was
hoping Andy would take the lead on that. It is something my Siemens
drivers would depend on, but really a generic thing as far as i
understand it.

regards,
Henning

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ