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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 28 Mar 2022 14:37:37 +0200
From:   Raphael Gallais-Pou <raphael.gallais-pou@...s.st.com>
To:     Xiaomeng Tong <xiam0nd.tong@...il.com>,
        <yannick.fertre@...s.st.com>
CC:     <philippe.cornu@...s.st.com>, <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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ