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]
Message-ID: <20150901084312.GA2823@codeblueprint.co.uk>
Date:	Tue, 1 Sep 2015 09:44:07 +0100
From:	Matt Fleming <matt@...eblueprint.co.uk>
To:	Wang Nan <wangnan0@...wei.com>
Cc:	acme@...nel.org, linux-kernel@...r.kernel.org, lizefan@...wei.com,
	pi3orama@...wei.com, Arnaldo Carvalho de Melo <acme@...hat.com>,
	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	"David S. Miller" <davem@...emloft.net>,
	Jiri Olsa <jolsa@...nel.org>
Subject: Re: [PATCH] perf tools: Fix potential array out of bounce accessing

On Tue, 01 Sep, at 03:29:44AM, Wang Nan wrote:
> There is a problem in dwarf-regs.c of sh, sparc and x86 that it is
> possible to make an out-of-bound array accessing when searching
> register names. This patch fixes it by replacing '<=' to '<', so when
> register (number == XXX_MAX_REGS), get_arch_regstr() returns NULL.
> 
> Signed-off-by: Wang Nan <wangnan0@...wei.com>
> Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
> Cc: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
> Cc: David S. Miller <davem@...emloft.net>
> Cc: Matt Fleming <matt@...sole-pimps.org>
> Cc: Jiri Olsa <jolsa@...nel.org>
> ---
>  tools/perf/arch/sh/util/dwarf-regs.c    | 2 +-
>  tools/perf/arch/sparc/util/dwarf-regs.c | 2 +-
>  tools/perf/arch/x86/util/dwarf-regs.c   | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)

Hmm, I wonder how that bug was introduced. I guess copy and paste is
probably to blame. Good catch.

Reviewed-by: Matt Fleming <matt.fleming@...el.com>

-- 
Matt Fleming, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ