find / rm corrupting memory

Natanael Copa natanael.copa at gmail.com
Mon Jan 28 10:10:27 UTC 2008


On Sun, 2008-01-27 at 22:05 +0000, Denis Vlasenko wrote:
> On Saturday 26 January 2008 07:19, Roy Marples wrote:
> > 
> > On Fri, 2008-01-25 at 22:55 +0000, Denis Vlasenko wrote:
> > > Can you post your .config?
> > 
> > Attached.
> 
> Aha. CONFIG_FEATURE_PREFER_APPLETS=y!

I was able to reporoduce in my hardened x86 uclibc environment after
discovering the dir should be empty. (I was not able to reproduce when i
blew a way my busybox files)

> Can you test something for me? Go to
> libbb/vfork_daemon_rexec.c and add getopt reset code
> (indicated by '+'):
> 
> int run_nofork_applet_prime(struct nofork_save_area *old, int applet_no, char **argv)
> {
>         int rc, argc;
> 
>         applet_name = APPLET_NAME(applet_no);
>         xfunc_error_retval = EXIT_FAILURE;
> 
> +#ifdef __GLIBC__
> +        optind = 0;
> +#else /* BSD style */
> +        optind = 1;
> +        /*optreset = 1; */
> +#endif
>         /*option_mask32 = 0; - not needed */
> ...
> 
> Does it help?

This seems to fix the problem.

-nc




More information about the busybox mailing list