[Top] [All Lists]

Re: Patch for the "ug" bug

To: Jean-Yves Avenard <>,
Subject: Re: Patch for the "ug" bug
From: Hauke Mehrtens <>
Date: Tue, 07 Jan 2014 20:52:50 +0100
In-reply-to: <>
List-archive: <>
List-help: <>
List-id: linux-mips <>
List-owner: <>
List-post: <>
List-software: Ecartis version 1.0.0
List-subscribe: <>
List-unsubscribe: <>
Original-recipient: rfc822;
References: <>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0
On 06/07/2012 12:41 PM, Jean-Yves Avenard wrote:
> Hello
> This is my first post here, so hopefully I'm doing it the right way.
> I recently an Asus RT-N66U router, powered by a Broadcom BCM5300. MIPS
> based obviously.
> I am an infrequent committer of the Tomato firmware team.
> One issue was reported that caused quite surprising problems. We call
> it the "ug" bug.
> In a shell:
> cd /tmp
> echo "#!/bin/sh" >bug
> echo 'echo -n $1.' >>bug
> chmod +x bug
> for i in 0 1 2 3 4 5 6 7 8 9; do bug $i; done
> would result in random data being output.
> Typically it would look something like:
> This issue affects a few other firmware (ddwrt) in particular. This
> doesn't affect Asus stock firmware
> After a short investigation, I ruled out that the problem was either
> in uclibc or busybox and is something related to an issue in the
> kernel
> Looking at the kernel shipped with the Asus, they have made some
> modifications in how pages are initialised...
> The following patch, is a port of the required changes that fix the
> memory corruption exposed by the "ug" bug...
> Let me know if you would like this patch to be submitted differently.
> Not knowing the submit policy, I put it inline, but due to the
> presence of tabs (ugh!) it may not come out properly.
> The patch is for the linux that ships with Tomato obviously, but
> checking the linux git repository, it will apply with minor mod. Let
> me know if you want me to do those mods for you..
> Best regards
> Jean-Yves Avenard


this is a little late but I haven't seen this earlier. I just tried your
script and had no problems on my Asus RT-N66U running OpenWrt with
kernel 3.10.24. This problem was either cause by some other non upstream
Broadcom modification or was already fixed in mainline kernel.

root@OpenWrt:~# cd /tmp
root@OpenWrt:/tmp# echo "#!/bin/sh" >bug
root@OpenWrt:/tmp# echo 'echo -n $1.' >>bug
root@OpenWrt:/tmp# cat bug
echo -n $1.
root@OpenWrt:/tmp# chmod +x bug
root@OpenWrt:/tmp# for i in 0 1 2 3 4 5 6 7 8 9; do ./bug $i; done


<Prev in Thread] Current Thread [Next in Thread>