Re: listening service without MMU?

2022-06-25 Thread Matt Johnston

On 2022-06-24 11:26 am, johnea wrote:


I've run across a number of other references since that timeframe that
indicate that dropbear can run on no-MMU platforms using uClibc.

Searching hasn't really led to a conclusive answer. So, could you
please confirm:

Can dropbear run as a listening service on Cortex-M3 with no-MMU?


Previously I would say no - usually it would need to run from inetd that 
executes a separate dropbear server process for each connection.
That is required because on a MMUless system the normal fork() doesn't 
create separate memory spaces for each program, so they interfere with 
each other.


But! In Dropbear 2022.82 it was changed to re-execute itself [1], so it 
is possible that it would work OK on a MMUless system. You could see if 
that works - there might be other assumptions that I have missed. Make 
sure you try a few concurrent connections.


Cheers,
Matt

[1]
- Dropbear now re-executes itself rather than just forking for each 
connection

  (only on Linux). This allows ASLR to randomise address space for each
  connection as a security mitigation. It should not have any visible 
impact

  - if there are any performance impacts in the wild please report it.


listening service without MMU?

2022-06-23 Thread johnea



Hello,

I'm building dropbear using the buildroot tool, for a SmartFusion2 Cortex-M3 
with no MMU.

I find in the config file for dropbear on buildroot:
  ./buildroot/package/dropbear/dropbear.mk

ifeq ($(BR2_USE_MMU),y)
define DROPBEAR_INSTALL_INIT_SYSV
$(INSTALL) -D -m 755 package/dropbear/S50dropbear \
$(TARGET_DIR)/etc/init.d/S50dropbear
endef
else
define DROPBEAR_DISABLE_STANDALONE
echo '#define NON_INETD_MODE 0' >> $(@D)/localoptions.h
endef
DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_DISABLE_STANDALONE
endif


Which disables the standalone NON_INETD_MODE.

In searching through the history of the buildroot git repository, this change 
seems to have been introduced in about 2013.

I've run across a number of other references since that timeframe that indicate 
that dropbear can run on no-MMU platforms using uClibc.

Searching hasn't really led to a conclusive answer. So, could you please 
confirm:

Can dropbear run as a listening service on Cortex-M3 with no-MMU?

Are there patches that can enable this?

Sorry if I'm asking a question that I should have been able to find an answer 
to.

Thank You for your reply...

John A
dropb...@johnea.net
2022-06-23