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: <87zj36tjw0.fsf@rustcorp.com.au>
Date:	Thu, 09 Jul 2015 07:03:03 +0930
From:	Rusty Russell <rusty@...tcorp.com.au>
To:	Peter Zijlstra <peterz@...radead.org>,
	Arthur Marsh <arthur.marsh@...ernode.on.net>
Cc:	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	linux-kernel@...r.kernel.org, rostedt <rostedt@...dmis.org>,
	Oleg Nesterov <oleg@...hat.com>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Subject: Re: [PATCH] module: Fix load_module() error path

Peter Zijlstra <peterz@...radead.org> writes:
> On Wed, Jul 08, 2015 at 02:32:44PM +0200, Peter Zijlstra wrote:
>
>> Awesome, lemme go write up a proper patch to make Rusty happy too ;-)

Thanks, Rusty is happy :)

Applied, and pushed to Linus.

Cheers,
Rusty.

> ---
> Subject: module: Fix load_module() error path
> From: Peter Zijlstra <peterz@...radead.org>
> Date: Wed Jul 8 14:35:58 CEST 2015
>
> The load_module() error path frees a module but forgot to take it out
> of the mod_tree, leaving a dangling entry in the tree, causing havoc.
>
> Cc: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
> Reported-by: Arthur Marsh <arthur.marsh@...ernode.on.net>
> Tested-by: Arthur Marsh <arthur.marsh@...ernode.on.net>
> Fixes: 93c2e105f6bc ("module: Optimize __module_address() using a latched RB-tree")
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> ---
>  kernel/module.c |    1 +
>  1 file changed, 1 insertion(+)
>
> --- a/kernel/module.c
> +++ b/kernel/module.c
> @@ -3557,6 +3557,7 @@ static int load_module(struct load_info
>  	mutex_lock(&module_mutex);
>  	/* Unlink carefully: kallsyms could be walking list. */
>  	list_del_rcu(&mod->list);
> +	mod_tree_remove(mod);
>  	wake_up_all(&module_wq);
>  	/* Wait for RCU-sched synchronizing before releasing mod->list. */
>  	synchronize_sched();
--
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