5 ms·
I have a question: doesn't all this extra (basically useless) driver code just increase the security risk for Linux? Like aren't you just increasing the attack
by cletus 6y ago
I have a question: doesn't all this extra (basically useless) driver code just increase the security risk for Linux?
Like aren't you just increasing the attack surface? Since all these drivers exist in kernelspace.
So there's three levels, as I understand it that driver code like this could be included (or not) in the kernel. This is not my area of expertise so please excuse me if I'm mistaken here but you have:
1. Not included in the kernel and not included as a module. This is obviously excluded at source and is the safest;
2. Available as a module but not loaded by default; and
3. Included in the kernel. I'm not 100% sure if there even is a distinction between this and (2) anymore. I remember at one point you could include code as part of the configure process during compilation and this was distinct from modules (at least for a time).
Either way, there doesn't seem to be a difference philosophically between (2) and (3), right? A vulnerable module can be loaded from userspace, generally speaking.
Also, I'm actually curious how often drivers are the source of security vulnerabilities? Is this a common or rare vector?
- duskwuff 6y agoThe driver in question can't even be compiled for x86 systems, either as a module or otherwise. Having it in the source tree is completely harmless.
- cbmuser 6y agoExactly. It's arch-specific code. It won't even show up in the kernel configuration unless the architecture is m68k.
- cletus 6y agoThat misses the point entirely. It’s not about this driver specifically but concerns the thousands of other “dead” drivers and similar that could be loaded.
- wtallis 6y agoMost people use their distro's default kernel binaries, which tend to include only modules that are at least somewhat likely to be used by that distro's target audience. Nobody ships kernels with all modules compiled.
- Jonnax 6y agoEven if it could compile for x86 why would you load a driver for a Mac II?
- dredmorbius 6y agoPeople do all sorts of things they shouldn't, especially in complex technological contexts. Of various possible responses, this strikes me as especially unsuited to actual behaviours at scale.
- yjftsjthsd-h 6y agoIn an ideal world, if I wanted to use the keyboard I used with my mac (G3, System 8), I would plug it into an adb-pci board installed in my new x86 machine and it would just work. In real life, I'd probably use an adb-usb converter and Linux probably would see a USB HID device, but that really is less elegant.
- yjftsjthsd-h 6y agoA driver should only be a security issue if it's actually running (loaded), and even if you have the module available on disk (which again, is unlikely for something obscure enough) it'll only get loaded if the kernel detects hardware that uses it, or someone does a modprobe (or equivalent), which already requires root. So having the driver available shouldn't add any risk unless you actually are using it anyways.
- swiley 6y agoI was under the impression the driver has to be loaded before the kernel can detect if it can use the hardware (that’s how probing works) so it’s the user space that picks the modules to load. Of course the driver probably won’t do anything if it never gets attached to a device (other than responding to probe requests on the bus it uses.)