4 ms·
Now if they could just get rid of Linux underneath and use something with better security. L4, maybe. After all, this is for embedded devices which basically ru
by Animats 11y ago
Now if they could just get rid of Linux underneath and use something with better security. L4, maybe. After all, this is for embedded devices which basically run one program.
- stephengillie 11y agoThey could use BSD underneath, like JunOS and Netscaler run on. But maybe an operating system is too large in scope. You're right that these devices only run one application, why use a tool (operating system) that can run many applications? It's a bit like running a hypervisor for only one operating system. There are benefits, true.
- jlgaddis 11y agoWell, there's the kernel, which handles flinging packets between interfaces, filtering, etc., but your average router has lots of services it provides as well: DHCP, DNS, file/print sharing via USB ports, etc.
- stephengillie 11y agoRight, and the Kernel could just provide those. No need to write something to load extra code from storage and run it.
- easp 11y agoLoading even more functionality into the kernel is at odds with security, stability and maintainability. Its also not going to save much/any in the way of resources.
- easp 11y agoA big part of the OpenWRT project is hardware support for wireless chipsets and SoCs. Sure, they could move all that to BSD, but then if they wanted to do that, why didn't they do that in the first place, rather than working on Linux?
- grahamburger 11y agoI typical consumer wireless router runs quite a few programs - routing, switching, dns, firewall, dhcp, web server for configuration, etc.
- nitrogen 11y agoAlso UPNP, media server, print server, VPN
- brokenmachine 11y agoOne of the great advantages of OpenWRT is that you can make projects that use extra packages, eg to use it to create wifi webcams, alarm systems, and all kinds of things using GPIO pins as well.
- DiabloD3 11y agoI don't know why parent is being downvoted. Linux probably isn't the best OS for this, a microkernel OS or something based on BSD seems to be far saner, especially since we don't need weird hardware support, all home routers use the same three or four families of MIPS and ARM SoCs.
- Animats 11y agoRouters are on the front line of computer security. They need to be very resistant to attack. Patch and release won't work; many routers never get patched, and those that do implicitly have a backdoor in the update system. This is a job for a limited protected-mode OS that Just Works. L4, QNX, something like that.
- emmelaich 11y agoOr you could go the other way and use SELinux or similar, together with lots of hardening.
- amluto 11y agoI think that using SELinux would be counterproductive. For this type of thing, the attacks that matter the most are web attacks (CSRF, etc) and attacks against the kernel. For web attacks, the web UI has to be quite privileged unless you explicitly privilege-separate it, Sandstorm-style. That seems like a big project for a router. For kernel attacks, SELinux just increases the attack surface. Throw a good seccomp filter at things, deny access to proc and sysfs to things that don't need them, and use hardening options. The trouble with anything other than Linux or maybe FreeBSD is driver support. And, for a router, even if an attacker merely compromises the network stack instead of compromising the whole system, the attacker still mostly wins. What would be interesting is a good verified boot or immutable storage model. For example, have the router boot into a mode in which it can't write to persistent storage unless a physical button is used at boot time. eMMC can do this, but I have no idea whether the NOR and NAND chips in most routers can.
- wtallis 11y ago
- cnvogel 11y agoAs far as I remember, L4 is such a minimal beast that you typically run something like a Linux-Kernel inside it, to do most of the boring stuff. And then use the guarantees on isolation provided by L4 to have timing or security critical functions into their own L4 tasks. Am I wrong there? But even if L4 would provide the minimal set of functions expected to pass packets on an embedded device like a router: Would you really gain security if you had to rewrite most of the libraries involved for, say, user-interface and configuration (where all of the exploits reside) from scratch? The whole wpa/wpa2-hostapd madness, or VPN setup with all the many dozens of possible protocol combinations? And even when one plans to rewrite hostapd, openvpn, dnsmasqd with all their dependencies from scratch, in a safer language than C, with reduced priviledges and isolated from the rest of the system: One still could run these replacements easily under a Linux kernel providing most of the necessary infrastructure and with hardly and bugs being discovered in the kernel core that would be relevant for such an embedded device.
- duaneb 11y agoLinux is the last choice for a good userland kernel.