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: <20180627102620.GA7893@red-moon>
Date:   Wed, 27 Jun 2018 11:26:42 +0100
From:   Lorenzo Pieralisi <lorenzo.pieralisi@....com>
To:     Bjorn Helgaas <helgaas@...nel.org>,
        Kishon Vijay Abraham I <kishon@...com>
Cc:     kernel test robot <lkp@...el.com>, linux-pci@...r.kernel.org,
        linux-kernel@...r.kernel.org, LKP <lkp@...org>
Subject: Re: [lkp-robot] [bisect done] ef1433f717 [    7.049860] BUG: unable
 to handle kernel NULL pointer dereference at 0000004c

On Tue, Jun 26, 2018 at 04:15:01PM -0500, Bjorn Helgaas wrote:
> On Tue, Jun 26, 2018 at 09:10:07AM +0800, kernel test robot wrote:
> > 
> > Greetings,
> > 
> > 0day kernel testing robot got the below dmesg and the first bad commit is
> > 
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > 
> > commit ef1433f717a2c63747a519d86965d73ff9bd08b3
> > Author:     Kishon Vijay Abraham I <kishon@...com>
> > AuthorDate: Mon Apr 2 18:59:35 2018 +0530
> > Commit:     Lorenzo Pieralisi <lorenzo.pieralisi@....com>
> > CommitDate: Fri May 18 16:40:50 2018 +0100
> > 
> >     PCI: endpoint: Create configfs entry for each pci_epf_device_id table entry
> >     
> >     In order to be able to provide correct driver_data for pci_epf device,
> >     a separate configfs entry for each pci_epf_device_id table entry in
> >     pci_epf_driver is required.
> >     
> >     Add support to create configfs entry for each pci_epf_device_id
> >     table entry here.
> >     
> >     Signed-off-by: Kishon Vijay Abraham I <kishon@...com>
> >     Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@....com>
> >     Tested-by: Gustavo Pimentel <gustavo.pimentel@...opsys.com>
> 
> From the .config below:
> 
>   # CONFIG_PCI_ENDPOINT_CONFIGFS is not set
> 
> From include/linux/pci-ep-cfs.h:
> 
>   #ifdef CONFIG_PCI_ENDPOINT_CONFIGFS
>   ...
>   #else
>   static inline struct config_group *pci_ep_cfs_add_epf_group(const char *name)
>   {
>         return 0;
>   }
> 
> From ef1433f717a2:
> 
>   +       id = driver->id_table;
>   +       while (id->name[0]) {
>   +               group = pci_ep_cfs_add_epf_group(id->name);
>   +               mutex_lock(&pci_epf_mutex);
>   +               list_add_tail(&group->group_entry, &driver->epf_group);
> 
> Obviously group == 0 and the list_add_tail() is a NULL pointer
> dereference.
> 
> Looks like we need either some sort of #ifdef CONFIG_PCI_ENDPOINT_CONFIGFS
> in __pci_epf_register_driver() and pci_epf_unregister_driver(), or
> higher-level interfaces and corresponding stubs that add/remove all
> the IDs.

Yes, probably augment pci_ep_cfs_add_epf_group() to take a driver
pointer so that adding a group is a NOP on !CONFIG_PCI_ENDPOINT_CONFIGFS.

Kishon can you please post a fix as soon as you can, thanks.

Lorenzo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ