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]
Message-ID: <87bjz9vjih.fsf@ubik.fi.intel.com>
Date: Thu, 24 Oct 2024 14:16:06 +0300
From: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
To: Qianqiang Liu <qianqiang.liu@....com>, namhyung@...nel.org
Cc: linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
 Qianqiang Liu <qianqiang.liu@....com>, alexander.shishkin@...ux.intel.com
Subject: Re: [PATCH] perf/x86/intel/pt: Fix NULL pointer dereference in
 pt_buffer_reset_markers

Qianqiang Liu <qianqiang.liu@....com> writes:

> The buf->stop_te and buf->intr_te may be NULL, so we need to check
> for NULL pointers before using them.

Iirc, this has come up before, because static analyzers get the idea
that at that point ->stop_te and ->intr_te can be NULL, but in reality,
they can't. When the buffer is created, stop_pos and intr_pos are set to
-1, which will always force ->stop_te and ->intr_te to be set the first
time around.

So no, not a bug. It might deserve a comment explaining the above logic,
so that more versions of this patch don't get generated from static
analyzers' reports.

Regards,
--
Alex

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ