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]
Date:	Wed, 16 Sep 2009 15:06:53 +0800
From:	Li Zefan <lizf@...fujitsu.com>
To:	Paul Mundt <lethal@...ux-sh.org>,
	Andrew Morton <akpm@...ux-foundation.org>
CC:	Lai Jiangshan <laijs@...fujitsu.com>,
	Sam Ravnborg <sam@...nborg.org>, Ingo Molnar <mingo@...e.hu>,
	linux-kernel@...r.kernel.org, linux-kbuild@...r.kernel.org,
	Paulo Marques <pmarques@...popie.com>
Subject: Re: [PATCH] kallsyms: Fix segfault in prefix_underscores_count().

>> But..as the name "prefix_underscores_count" suggests, shouldn't
>> it be:
>> 	while (*tail == '_')
>> 		tail++;
>> ??
>>
> Yes, that was what I did initially as well, but the behaviour is not
> exactly the same, and I wanted an explanation from Lai if there were some
> other intentions for the code. In any event, simplifying it still manages
> to do the right thing, so I'm fine with that.
> 

I know what happened.

Lai sent this patch:
	http://lkml.org/lkml/2009/3/13/72

And he himself found the bug, and fixed it and resent it:
	http://lkml.org/lkml/2009/3/13/156

But Andrew mistakenly picked up the former one.

> ------------------------
> Subject: [PATCH] kallsyms: Fix segfault in prefix_underscores_count().
> 
> Commit b478b782e110fdb4135caa3062b6d687e989d994 "kallsyms, tracing:
> output more proper symbol name" introduces a "bugfix" that introduces
> a segfault in kallsyms in my configurations.
> 
> The cause is the introduction of prefix_underscores_count() which
> attempts to count underscores, even in symbols that do not have them.
> As a result, it just uselessly runs past the end of the buffer until it
> crashes:
> 
>   CC      init/version.o
>   LD      init/built-in.o
>   LD      .tmp_vmlinux1
>   KSYM    .tmp_kallsyms1.S
> /bin/sh: line 1: 16934 Done                    sh-linux-gnu-nm -n .tmp_vmlinux1
>      16935 Segmentation fault      | scripts/kallsyms > .tmp_kallsyms1.S
> make: *** [.tmp_kallsyms1.S] Error 139
> 
> This simplifies the logic and just does a straightforward count.
> 
> Signed-off-by: Paul Mundt <lethal@...ux-sh.org>
> 

Reviewed-by: Li Zefan <lizf@...fujitsu.com>
--
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