Em Tue, 4 Jul 2023 07:47:31 +0100 Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> escreveu: > On Mon, Jul 03, 2023 at 11:11:57PM +0200, Enrico Mioso wrote: > > Hi all!! > > > > I think the rndis_host USB driver might emit a warning in the dmesg, but disabling the driver wouldn't be a good idea. > > The TP-Link MR6400 V1 LTE modem and also some ZTE modems integrated in routers do use this protocol. > > > > We may also distinguish between these cases and devices you might plug in - as they pose different risk levels. > > Again, you have to fully trust the other side of an RNDIS connection, > any hints on how to have the kernel determine that? Kernel may not know but the user does. See, when doing a security risk assessment, one needs to evaluate the risks, the costs to implement mitigation issues, and the measures that will be taken. Sometimes, the measure is to just accept the risk, as either the chances to actually happen on a particular scenario is very unlikely, and/or the costs to mitigate are too high. In any case, it should not be up to Kernel developers to do risk assessment, as this has to be checked case by case. For instance I usually disable several the security options on my slow test devices, as the risk to run untrusted code on them while I'm testing a new Kernel I just built is close to zero and doesn't pay off the the extra hours I'll be wasting otherwise. In the specific case of untrusted USB devices, the risk of having USB untrusted sticks connected to my desktop machine is very low, and if a criminal breaks into my house to be close enough to plug an USB device, I would have a lot more to be concerned than just my PC. Granted, the risk is higher on laptops and mobile devices, but still it might be acceptable on some use cases. Maybe a compromise would be to add a modprobe parameter and/or a Kconfig option to allow enabling RDNIS host and RDNIS gadget support at the security options to let the user select what kind of risks he's willing to take. Thanks, Mauro