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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOMZO5DXLoy-PRQW0sYXf+eDOZ1=XqKsC-hcNWMKLg9K2oGQQg@mail.gmail.com>
Date:   Mon, 26 Apr 2021 09:15:51 -0300
From:   Fabio Estevam <festevam@...il.com>
To:     Sherry Sun <sherry.sun@....com>
Cc:     Greg KH <gregkh@...uxfoundation.org>,
        "jirislaby@...nel.org" <jirislaby@...nel.org>,
        "linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        dl-linux-imx <linux-imx@....com>
Subject: Re: [PATCH 2/2] tty: serial: fsl_lpuart: fix the potential bug of
 dereference null return value

On Mon, Apr 26, 2021 at 9:09 AM Sherry Sun <sherry.sun@....com> wrote:

> Thanks for your reply.
> I guess you mean the of_match_table will not be NULL since it contains compatible, right?
> But for the lpuart data -- struct lpuart_soc_data, won’t it meet the NULL case? such as { .compatible = "fsl,imx8qxp-lpuart",  }.
> Here of_device_id won’t be NULL, but lpuart_soc_data Is NULL.

In linux-next we have:

static const struct of_device_id lpuart_dt_ids[] = {
{ .compatible = "fsl,vf610-lpuart", .data = &vf_data, },
{ .compatible = "fsl,ls1021a-lpuart", .data = &ls1021a_data, },
{ .compatible = "fsl,ls1028a-lpuart", .data = &ls1028a_data, },
{ .compatible = "fsl,imx7ulp-lpuart", .data = &imx7ulp_data, },
{ .compatible = "fsl,imx8qxp-lpuart", .data = &imx8qxp_data, },
{ /* sentinel */ }
};

All compatible entries have a .data field populated.

How sdata can be NULL?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ