[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: Busybox awk throws glibc failure if using standalone/preferred applet feature
From:       Harald Becker <ralda () gmx ! de>
Date:       2012-08-12 16:48:40
Message-ID: 20120812184840.776c52c7 () ralda ! gmx ! de
[Download RAW message or body]

Hi Tito !


>"Format of /etc/busybox.conf:
>
>The file has to be owned by user root, group root and has to be
>writeable only by root (chown 0.0; chmod 600;). "

They way I have setup busybox.conf (root.root -rw-------), and the way
it worked for a long time. I have not stepped into this bug before, but
possibly due to the fact that most of my Busybox based control scripts
run as root or did not rely on that preferred applet feature.

>I suppose the missing of the entry leeds to some free error.

Yes, I ought we stumbled on a long standing bug, which hasn't bean
detected earlier.

>By intuition I would check (comment out for testing) llist_free at the
>end of parse_config_file(void) in libbb/appletlib.c
>(or maybe try sct_head = xzalloc(sizeof(*sct_head)) at the beginning
>of parse_config_file). Another candidate is list_free at the end of
>check_suid(int applet_no). All this calls to list_free look suspicious
>to me.

Need to look into this, haven't had the time/"inspiration" to do that
before ...

>So the bug is triggered when /etc/busybox.conf is parsed
>and there is no entry for the applet, permissions
>seem to be irrelevant.

In addition I reproduced the bug only for some BB_SUID_DROP applets
(did not check all applets), and the bug is only triggered when the
applet is called via this exec prefer applet feature. If applet is
invoked using "busybox APLLETNAME ARGS" or via symlink to Busybox the
bug has not bean recognized yet.

--
Harald
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic