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: <f2d9d0e9-aecf-6436-6ff5-56b4ccb98f6c@foss.st.com>
Date:   Thu, 7 Apr 2022 11:01:19 +0200
From:   Philippe CORNU <philippe.cornu@...s.st.com>
To:     Raphael Gallais-Pou <raphael.gallais-pou@...s.st.com>,
        Xiaomeng Tong <xiam0nd.tong@...il.com>,
        <yannick.fertre@...s.st.com>
CC:     <airlied@...ux.ie>, <daniel@...ll.ch>, <mcoquelin.stm32@...il.com>,
        <alexandre.torgue@...s.st.com>, <marex@...x.de>,
        <dri-devel@...ts.freedesktop.org>,
        <linux-stm32@...md-mailman.stormreply.com>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>, <stable@...r.kernel.org>
Subject: Re: [PATCH] stm: ltdc: fix two incorrect NULL checks on list iterator



On 3/28/22 14:37, Raphael Gallais-Pou wrote:
> Hello Xiaomeng
> 
> On 3/27/22 07:53, Xiaomeng Tong wrote:
>> The two bugs are here:
>> 	if (encoder) {
>> 	if (bridge && bridge->timings)
>>
>> The list iterator value 'encoder/bridge' will *always* be set and
>> non-NULL by drm_for_each_encoder()/list_for_each_entry(), so it is
>> incorrect to assume that the iterator value will be NULL if the
>> list is empty or no element is found.
>>
>> To fix the bug, use a new variable '*_iter' as the list iterator,
>> while use the old variable 'encoder/bridge' as a dedicated pointer
>> to point to the found element.
>>
>> Cc: stable@...r.kernel.org
>> Fixes: 99e360442f223 ("drm/stm: Fix bus_flags handling")
>> Signed-off-by: Xiaomeng Tong <xiam0nd.tong@...il.com>
>> ---
>>   drivers/gpu/drm/stm/ltdc.c | 16 ++++++++++------
>>   1 file changed, 10 insertions(+), 6 deletions(-)
> 
> 
> Thanks for your fix
> 
> Acked-by: Raphael Gallais-Pou <raphael.gallais-pou@...s.st.com>
> 
> 
> Raphaƫl Gallais-Pou
> 

Applied on drm-misc-next.
Many thanks for your patch,
Philippe :-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ