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: <200904160046.n3G0ki9o028612@www262.sakura.ne.jp>
Date:	Thu, 16 Apr 2009 09:46:44 +0900
From:	Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
To:	hugh@...itas.com
Cc:	arjan@...ux.intel.com, gregkh@...e.de, alan@...rguk.ukuu.org.uk,
	viro@...IV.linux.org.uk, jmorris@...ei.org,
	akpm@...ux-foundation.org, paulmck@...ux.vnet.ibm.com,
	linux-kernel@...r.kernel.org
Subject: Re: [2.6.30-rc1] RCU detected CPU 1 stall

Hello.

Hugh Dickins wrote:
> --- 2.6.30-rc1/lib/kobject_uevent.c	2009-04-08 18:20:24.000000000 +0100
> +++ linux/lib/kobject_uevent.c	2009-04-15 19:59:33.000000000 +0100
> @@ -244,11 +244,9 @@ int kobject_uevent_env(struct kobject *k
>  
>  	/* call uevent_helper, usually only enabled during early boot */
>  	if (uevent_helper[0]) {
> -		char *argv [3];
> -
> -		argv [0] = uevent_helper;
> -		argv [1] = (char *)subsystem;
> -		argv [2] = NULL;
> +		env->argv[0] = uevent_helper;
> +		env->argv[1] = (char *)subsystem;
> +		env->argv[2] = NULL;
>  		retval = add_uevent_var(env, "HOME=/");
>  		if (retval)
>  			goto exit;
> @@ -257,7 +255,7 @@ int kobject_uevent_env(struct kobject *k
>  		if (retval)
>  			goto exit;
>  
> -		retval = call_usermodehelper(argv[0], argv,
> +		retval = call_usermodehelper(env->argv[0], env->argv,
>  					     env->envp, UMH_NO_WAIT);
>  	}
>  
Indeed, we can't use "argv" put on stack memory if we use "no wait" mode.
We need to ensure that memory region pointed by "argv" is valid until
do_execve() finishes. However,
| 
| exit:
| 	kfree(devpath);
| 	kfree(env);
| 	return retval;
| }
"env" can be overwritten as well as "argv".
We need to ensure that memory region pointed by "env" is valid until
do_execve() finishes, don't we?

I think we need to use UMH_WAIT_EXEC instead of UMH_NO_WAIT.

Regards.
--
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