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: <DB3PR0402MB3916A9FED386A432551132B0F5CB0@DB3PR0402MB3916.eurprd04.prod.outlook.com>
Date:   Fri, 19 Jul 2019 07:54:40 +0000
From:   Anson Huang <anson.huang@....com>
To:     Alexandre Belloni <alexandre.belloni@...tlin.com>
CC:     "a.zummo@...ertech.it" <a.zummo@...ertech.it>,
        "linux-rtc@...r.kernel.org" <linux-rtc@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        dl-linux-imx <linux-imx@....com>
Subject: RE: [PATCH V2] rtc: snvs: fix possible race condition

Hi, Alexandre

> On 19/07/2019 11:01:02+0800, Anson.Huang@....com wrote:
> > From: Anson Huang <Anson.Huang@....com>
> >
> > The RTC IRQ is requested before the struct rtc_device is allocated,
> > this may lead to a NULL pointer dereference in IRQ handler.
> >
> > To fix this issue, allocating the rtc_device struct and register rtc
> > device before requesting the RTC IRQ.
> >
> > Using devm_rtc_allocate_device/rtc_register_device instead of
> > devm_rtc_device_register.
> >
> > Signed-off-by: Anson Huang <Anson.Huang@....com>
> > ---
> > Changes since V1:
> > 	- move devm_request_irq() to after rtc device register done, make
> sure everything
> > 	  is ready before enabling IRQ.
> 
> This opens another race condition, the first version of the patch was correct.

Hmm, OK, then we should go with V1.

Thanks,
Anson.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ