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]
Date:   Tue, 5 Feb 2019 15:14:36 +0100
From:   Stefan Wahren <stefan.wahren@...e.com>
To:     Wolfram Sang <wsa@...-dreams.de>,
        Paul Kocialkowski <paul.kocialkowski@...tlin.com>
Cc:     Florian Fainelli <f.fainelli@...il.com>,
        Scott Branden <sbranden@...adcom.com>,
        Eben Upton <eben@...pberrypi.org>,
        Maxime Ripard <maxime.ripard@...tlin.com>,
        Ray Jui <rjui@...adcom.com>, linux-kernel@...r.kernel.org,
        Eric Anholt <eric@...olt.net>,
        bcm-kernel-feedback-list@...adcom.com, linux-i2c@...r.kernel.org,
        Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
        linux-arm-kernel@...ts.infradead.org,
        linux-rpi-kernel@...ts.infradead.org
Subject: Re: [PATCH v2] i2c: bcm2835: Clear current buffer pointers and counts
 after a transfer

Am 05.02.19 um 13:09 schrieb Wolfram Sang:
> On Thu, Dec 27, 2018 at 04:42:25PM +0100, Paul Kocialkowski wrote:
>> The driver's interrupt handler checks whether a message is currently
>> being handled with the curr_msg pointer. When it is NULL, the interrupt
>> is considered to be unexpected. Similarly, the i2c_start_transfer
>> routine checks for the remaining number of messages to handle in
>> num_msgs.
>>
>> However, these values are never cleared and always keep the message and
>> number relevant to the latest transfer (which might be done already and
>> the underlying message memory might have been freed).
>>
>> When an unexpected interrupt hits with the DONE bit set, the isr will
>> then try to access the flags field of the curr_msg structure, leading
>> to a fatal page fault.
>>
>> The msg_buf and msg_buf_remaining fields are also never cleared at the
>> end of the transfer, which can lead to similar pitfalls.
>>
>> Fix these issues by introducing a cleanup function and always calling
>> it after a transfer is finished.
>>
>> Fixes: e2474541032d ("i2c: bcm2835: Fix hang for writing messages larger than 16 bytes")
>> Signed-off-by: Paul Kocialkowski <paul.kocialkowski@...tlin.com>
> Stefan, Florian, any comment about this patch?

Acked-by: Stefan Wahren <stefan.wahren@...e.com>

Thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ