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] [day] [month] [year] [list]
Message-ID: <7b0940a9-ea65-d83e-7450-a09a0082bcd5@gmail.com>
Date:   Sat, 10 Jul 2021 00:30:56 +0300
From:   Dmitry Osipenko <digetx@...il.com>
To:     Michał Mirosław <mirq-linux@...e.qmqm.pl>
Cc:     Thierry Reding <treding@...dia.com>,
        Jonathan Hunter <jonathanh@...dia.com>,
        Mark Brown <broonie@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Sebastian Reichel <sre@...nel.org>,
        Peter Chen <peter.chen@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Felipe Balbi <balbi@...nel.org>,
        David Heidelberg <david@...t.cz>, devicetree@...r.kernel.org,
        linux-pm@...r.kernel.org, linux-usb@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-tegra@...r.kernel.org
Subject: Re: [PATCH v1 05/12] usb: otg-fsm: Fix hrtimer list corruption

09.07.2021 01:42, Michał Mirosław пишет:
> On Thu, Jul 01, 2021 at 05:23:58AM +0300, Dmitry Osipenko wrote:
>> The HNP work can be re-scheduled while it's still in-fly. This results in
>> re-initialization of the busy work, resetting the hrtimer's list node of
>> the work and crashing kernel with null dereference within kernel/timer
>> once work's timer is expired. It's very easy to trigger this problem by
>> re-plugging USB cable quickly. Initialize HNP work only once to fix this
>> trouble.
> [...]
>> -	INIT_DELAYED_WORK(&fsm->hnp_polling_work, otg_hnp_polling_work);
>> +	if (!fsm->hnp_work_inited) {
>> +		INIT_DELAYED_WORK(&fsm->hnp_polling_work, otg_hnp_polling_work);
>> +		fsm->hnp_work_inited = true;
>> +	}
>> +
> 
> Maybe you could just add an initialization function to be called by
> users of otg_fsm? It seems that only chipidea driver uses this
> struct currently.

If there are any out-of-tree users of the OTG FSM, then they will all
get the fix too using the universal solution.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ