Technical Discussion
  >> Security Related Issues


Register (or login) on our website and you will not see this ad.


  Print Thread
Standard User Michael_Chare
(knowledge is power) Mon 08-Aug-22 23:34:25
Print Post

Corrupted routers file systems?


[link to this post]
 
My broadband router is a Qotom which is a small PC with in my case 4 ethernet ports. I use two one for the wan connection and one for my local network. I started off using Pfsense and later changed to Opnsense.

Both these operating systems now support the ZFS file system which is less likely to be corrupted by a power failure. So I may well install a new version to get this benefit.

But this has lead me to wondering how often ISP supplied routers fail with a corrupted file system because of power cuts?

Michael Chare
Standard User andynormancx
(committed) Tue 09-Aug-22 11:19:10
Print Post

Re: Corrupted routers file systems?


[re: Michael_Chare] [link to this post]
 
Consumer routers don't tend to write to the root filesystem with the operating system on it, they tend to be mounted readonly or even loaded into RAM disks.

Configuration doesn't tend to be written out very often, so you'd be unlucky to lose power while something critical was being written. Many consumer routers write config to a filesystem-less flash storage area, which is more robust than your average non ZFS filesystem.

Logging tends to in RAM or to a separately mounted filesystem.

pfSense and Opnsense are very different in these regards and certainly benefit from ZFS (my pfSense box is using it).

Edited by andynormancx (Tue 09-Aug-22 11:19:53)

Standard User smouty
(member) Tue 09-Aug-22 11:22:57
Print Post

Re: Corrupted routers file systems?


[re: Michael_Chare] [link to this post]
 
The majority of ISP provided routers use 'firmware' type OS in some form of flash chip.
As these are likely only read on boot I would say much less likely to corrupt as they are not being written to except during an firmware update. Other variable may be stored in some form of NV Ram.
I used an Asus running Tomato for 10 years or so without a single corruption of the firmware.

Like a Raspberry Pi running on an SD Card, things like constant logging is what is likely to kill it.

OPNSense
PiHole
Unifi for Wifi


Register (or login) on our website and you will not see this ad.

Standard User Pipexer
(eat-sleep-adslguide) Tue 09-Aug-22 18:01:25
Print Post

Re: Corrupted routers file systems?


[re: Michael_Chare] [link to this post]
 
In reply to a post by Michael_Chare:
But this has lead me to wondering how often ISP supplied routers fail with a corrupted file system because of power cuts?

Do they?
What is possible is the configuration settings are getting corrupted and the firmware may not be able to deal with that.
It could also be that during bootup there is an element of write access going on and if the power cut occurs multiple times in a short window it is ocurring during a brief write operation.

Andrews & Arnold Home ::1 on Draytek 2862ac - Why settle for inferior?
Standard User E300
(committed) Wed 10-Aug-22 09:16:24
Print Post

Re: Corrupted routers file systems?


[re: Michael_Chare] [link to this post]
 
With consumer routers they will be using forms of non-volatile memory, these are typically much simpler than an actual file system and write small amounts of data at a time quite quickly. The chips have brown out detection and in some cases power loss detection, they will know the power is dropping to a point at which writing to non-volatile memory is not reliable and stop those writes. Data is lost rather than corrupted. On disconnecting the power, while to us the router might seem to go off immediately, in reality the chips get a good number of milliseconds (capacitors in the router cause the voltage to tail of rather than immediately vanish) in which to stop doing writes to memory cleanly.

Updating the firmware is the most risky process where power failure is concerned as that is writing large amounts of data and it either needs to be all done or not at all, you can't have a part firmware update. Typically though devices have double the amount of space for firmware so can hold two versions, the new version gets written and only when complete and validated to be correct is it then switched to be used to boot from.

Standard User majika2007
(member) Fri 23-Dec-22 15:15:14
Print Post

Re: Corrupted routers file systems?


[re: Michael_Chare] [link to this post]
 
if you head over to Merlin Firmware for Asus routers you can find out all about NVRAM and methods used to configure routers and how the internals kind of work, OK its ASUS but is consumer grade..
It is well worth having a read over Merlins github docs/gists.
you can see how it all comes into play..
HTH's

My Broadband Speed Test
BT FTTP 900/110 - BQM grin
VPN STR SpeedTest
  Print Thread

Jump to