[Buildroot] [PATCH 1/1] busybox: Add upstream patch to avoid occasional mdev SIGSEGV.
Peter Korsgaard
jacmet at uclibc.org
Wed Jun 12 20:54:42 UTC 2013
>>>>> "Raúl" == Raúl Sánchez Siles <rasasi78 at gmail.com> writes:
Hi,
>> I would prefer to not rename the existing patch, as it makes it less
>> clear where it comes from (http://busybox.net/downloads/fixes-1.21.0/).
>>
>> It shouldn't be necessary either as '.' comes before '_' (but not before
>> '-').
Raúl> That's not what I got here. I've done a more comprehensive test:
Raúl> $ ls -1 |sort
Raúl> busybox-1.21.0-mdev_2_check_ACTION.patch
Raúl> busybox-1.21.0-mdev_check_ACTION.patch
Raúl> busybox-1.21.0-mdev-check_ACTION.patch
Raúl> busybox-1.21.0-mdev.patch
Raúl> As you can see the one we want to apply first comes last
Raúl> compared with other possibilities :/
That's because localization is odd.
touch busybox-1.21.0-mdev_2_check_ACTION.patch busybox-1.21.0-mdev.patch
ls -1
busybox-1.21.0-mdev_2_check_ACTION.patch
busybox-1.21.0-mdev.patch
LANG=C ls -1
busybox-1.21.0-mdev.patch
busybox-1.21.0-mdev_2_check_ACTION.patch
We should arguably force LANG=C (or atleast LC_COLLATE, E.G. the sort
order) in apply-patches.sh so we always use the same sort order, I'll
fix that now.
>> Talking of which, why is this patch not in the fixes directory? Does
>> Denys not consider it important enough?
Raúl> That's probably something to ask him. I found this bug by
Raúl> chance and I don't consider it critical in any way, altough I
Raúl> haven't explored further implications. This can be reproduced
Raúl> when you invoke mdev without parameters. It will SIGSEGV since,
Raúl> as per current 1.21.0 code, you'll check for ACTION environment
Raúl> variable, which doesn't exist. This means a null pointer which is
Raúl> passed to index_in_strings which, in turn, passes it to the
Raúl> uclibc strcmp function that is unable to handle this case
Raúl> gracefully.
Could you bring it up on the busybox list and suggest it gets added to 1.21-fixes, please?
--
Bye, Peter Korsgaard
More information about the buildroot
mailing list