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: <20211012151218.GF8429@kadam>
Date:   Tue, 12 Oct 2021 18:12:18 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Thomas Hellström 
        <thomas.hellstrom@...ux.intel.com>
Cc:     Colin King <colin.king@...onical.com>,
        Jani Nikula <jani.nikula@...ux.intel.com>,
        Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
        Rodrigo Vivi <rodrigo.vivi@...el.com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        Matthew Auld <matthew.auld@...el.com>,
        intel-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
        kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH][next] drm/i915: Fix dereference of pointer backup before
 it is null checked

On Tue, Oct 12, 2021 at 04:47:24PM +0200, Thomas Hellström wrote:
> Hi,
> 
> On 10/12/21 15:25, Colin King wrote:
> > From: Colin Ian King <colin.king@...onical.com>
> > 
> > The assignment of pointer backup_bo dereferences pointer backup before
> > backup is null checked, this could lead to a null pointer dereference
> > issue. Fix this by only assigning backup_bo after backup has been null
> > checked.
> > 
> > Addresses-Coverity: ("Dereference before null check")
> > Fixes: c56ce9565374 ("drm/i915 Implement LMEM backup and restore for suspend / resume")
> > Signed-off-by: Colin Ian King <colin.king@...onical.com>
> 
> There's not really a pointer dereference here, just pointer arithmetics, so
> the code should be safe (but admittedly fragile), so to keep Coverity happy,
> 
> Reviewed-by: Thomas Hellström <thomas.hellstrom@...ux.intel.com>

Yeah.  I kind of feel like we shouldn't work around static checker bugs.
But when we do then there shouldn't be a Fixes tag.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ