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]
Message-ID: <CAMhUBjmtkDfbgVR9iPuVPC249h1Gx57kzNpo2j=hWkiFj5B9Jg@mail.gmail.com>
Date:   Fri, 21 May 2021 13:09:55 +0800
From:   Zheyu Ma <zheyuma97@...il.com>
To:     Greg KH <gregkh@...uxfoundation.org>
Cc:     cernekee@...il.com, jirislaby@...nel.org,
        linux-serial@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] serial: rp2: disable interrupt in rp2_probe():

On Thu, May 20, 2021 at 10:30 PM Greg KH <gregkh@...uxfoundation.org> wrote:
>
> On Fri, May 14, 2021 at 11:17:07AM +0000, Zheyu Ma wrote:
> > In 'rp2_probe', the driver registers 'rp2_uart_interrupt' then calls
> > 'rp2_fw_cb' through 'request_firmware_nowait'. In 'rp2_fw_cb', if the
> > firmware don't exists, function just return without initializing ports
> > of 'rp2_card'. But now the interrupt handler function has been registered,
> > and when an interrupt comes('rp2' may shares an interrupt line with other
> > devices), 'rp2_uart_interrupt' may access those ports then causing NULL
> > pointer dereference or other bugs.
> >
> > Fix this by disabling interrupt after registering 'rp2_uart_interrupt',
> > and enable it in 'rp2_uart_startup'.
>
> What prevents an interrupt from coming in right after callin
> rp2_uart_interrupt()?  The driver has to be able to handle that.  Why is
> the interrupt being registered before the firmware is loaded?  That
> should be the proper fix as once you register an interrupt, the driver
> HAS to be able to properly handle it.
>
> thanks,
>
> greg k-h

Thanks for your comments, I will reconsider this patch and send the
second version of the patch.

Zheyu Ma

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ