[LEDE-DEV] dropbear & gcc 7.1.0

Syrone Wong wong.syrone at gmail.com
Mon May 29 23:25:35 PDT 2017


Can this related to endianness? Based on current reports, it only
occurs on big-endian platforms.

I found:

* Note: in order to use the optimized macros your platform must
support unaligned 32 and 64 bit read/writes.
* The x86 platforms allow this but some others [ARM for instance] do
not. On those platforms you **MUST**
* use the portable [slower] macros.

in https://github.com/mkj/dropbear/blob/master/libtomcrypt/src/headers/tomcrypt_cfg.h

A quick way to verify this might be define LTC_NO_ASM.

Best Regards,
Syrone Wong


On Tue, May 30, 2017 at 12:53 AM, Kevin Darbyshire-Bryant
<kevin at darbyshire-bryant.me.uk> wrote:
> On 29/05/17 16:54, e9hack wrote:
>>
>> Am 29.05.2017 um 10:13 schrieb Bastian Bittorf:
>>>
>>> * Syrone Wong <wong.syrone at gmail.com> [29.05.2017 10:03]:
>>>>>
>>>>> have you tried to '/etc/init.d/dropbear'?
>>>>
>>>>
>>>> The problem is you cannot access the router, which means you cannot
>>>> execute any commands.
>>>
>>>
>>> ok, maybe you can execute a command with LuCI?
>>> (i'am not familiar with LuCI)
>>> maybe you can try serial console.
>>> maybe you can put that into /etc/rc.local
>>>
>>> i wanted to write: '/etc/init.d/dropbear restart', sorry for that.
>>>
>>
>> I did try it already with custom commands from LuCI. It doesn't help.
>> Dropbear is still running but to connect isn't
>> possible.
>
>
> Had a really quick play with this and as I suspected it's related to
> compiler optimization flags.  In essence, if I compile with '-Os' then
> dropbear plays dumb, with my usual (but different from default) of '-O2'
> then dropbear, gcc 7 & mips get on fine, irrespective of target -march
> settings.
>
> So as further totally wild guesses and on the basis 'ssh -vvv' shows things
> hanging during the initial ECDH key exchange, I'm going to guess this is
> happening somewhere in the libtommath/crypt libraries.
>
> Kevin
>
>
> _______________________________________________
> Lede-dev mailing list
> Lede-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev



More information about the Lede-dev mailing list