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: <20090827045314.GA4689@cr0.nay.redhat.com>
Date:	Thu, 27 Aug 2009 12:53:14 +0800
From:	Amerigo Wang <xiyou.wangcong@...il.com>
To:	Rusty Russell <rusty@...tcorp.com.au>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-kernel@...r.kernel.org,
	James Bottomley <James.Bottomley@...senpartnership.com>,
	Helge Deller <deller@....de>
Subject: Re: [PATCH 2/2] module: workaround duplicate section names

On Wed, Aug 26, 2009 at 10:04:12PM +0930, Rusty Russell wrote:
>From: James Bottomley <James.Bottomley@...senPartnership.com>
>
>(This patch leaves other problems, particularly the sections
> directory, but recent parisc toolchains seem to produce these
> modules and this prevents a crash and is a minimal change -- RR).
>
>The root cause is a duplicate section name (.text); is this legal?

AFAIK, yes.


>
>However, there's a problem with commit
>6d76013381ed28979cd122eb4b249a88b5e384fa in that if you fail to allocate
>a mod->sect_attrs (in this case it's null because of the duplication),
>it still gets used without checking in add_notes_attrs()
>
>This should fix it
>
>Signed-off-by: James Bottomley <James.Bottomley@...e.de>
>Signed-off-by: Rusty Russell <rusty@...tcorp.com.au>
>Tested-by: Helge Deller <deller@....de>

Looks fine for me.

Reviewed-by: WANG Cong <xiyou.wangcong@...il.com>

Thanks.


>---
>
>diff --git a/kernel/module.c b/kernel/module.c
>index fd14114..a703c49 100644
>--- a/kernel/module.c
>+++ b/kernel/module.c
>@@ -2353,7 +2353,8 @@ static noinline struct module *load_module(void __user *umod,
> 	if (err < 0)
> 		goto unlink;
> 	add_sect_attrs(mod, hdr->e_shnum, secstrings, sechdrs);
>-	add_notes_attrs(mod, hdr->e_shnum, secstrings, sechdrs);
>+	if (mod->sect_attrs)
>+		add_notes_attrs(mod, hdr->e_shnum, secstrings, sechdrs);
> 
> 	/* Get rid of temporary copy */
> 	vfree(hdr);
>--
>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/
--
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