Linux 已准备好禁用微软的 RNDIS 驱动程序，但是……
RNDIS USB

> 
> Linux 内核将不再支持 RNDIS 驱动程序。这是一个好的举措吗？这对你意味着什么？在这里了解一下。
> 
> 
> 


![Linux 已经准备好禁用微软的 RNDIS 驱动程序](/data/attachment/album/202301/17/124120ozecyhbzpey0tvpn.png)


微软的 RNDIS 协议（即 <ruby> 远程网络驱动接口规范 <rt>  Remote Network Driver Interface Specification </rt></ruby> 的简称），是一个专有的 USB 协议，用于计算机上的虚拟以太网功能。


这方面最常见的使用情况是通过连接到电脑上的 USB，使用手机的移动网络连接互联网，也称为 <ruby> <a href="https://en.wikipedia.org/wiki/Tethering">  系连 </a> <rt>  Tethering </rt></ruby>。


尽管它主要在 Windows 上工作，但它成为 Linux 内核的一部分已经有一段时间了。


但这种情况很快就会改变。


### 向 RNDIS 协议说再见？


![](/data/attachment/album/202301/17/124120j63b6c43bqs1yx4i.jpg)


**发生了什么？** 周一，[Greg Kroah-Hartman](https://twitter.com/gregkh) 创建了 [usb.git rndis-removal](https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/commit/?h=rndis-removal&id=5eb127bb9741c1480aff95ffa4e1bd4cd9b5b16d) 分支，其中他提到禁用 Linux 上所有 RNDIS 协议驱动程序的实现。


在该提交中他提到：



> 
> 微软的 RNDIS 协议按照设计是不安全的，在任何连接不信任的主机或设备的系统上使用它都是脆弱的。因为该协议不可能变得安全，所以只要禁用所有的 RNDIS 驱动，就可以防止任何人再使用它们。Windows 只在 XP 和更新一些的系统中需要用它，比这更早的 Windows 系统可以使用正常的 USB 类协议来代替，没有这些问题。
> 
> 
> 


正如最初由 [Phoronix](https://www.phoronix.com/news/Linux-Disabling-RNDIS-Drivers) 报道的那样，一旦这个协议在 Kconfig 选项中被标记为 “损坏”，它将再保留一段时间，最终从内核中删除。


但是**为什么呢？**


众所周知，RNDIS 在 Windows 之外的平台上的实现是一团糟，并带来了相当多的安全风险。此外，RNDIS 并不像以前那样广泛使用了，它带来的安全风险可能是作出这一决定的主要原因之一。


**这对目前的用户有影响吗？你应该担心吗？**


如果我们看一下对这一即将到来的变化的 [Reddit 讨论](https://www.reddit.com/r/linux/comments/108avzx/linux_preparing_to_disable_drivers_for_microsofts/)，我们会发现许多用户仍然很担心**这是否会破坏大家的 USB 连接**。


考虑到许多安卓手机仍然使用 RNDIS 而不是 CDC NCM（一种较新的协议），用户似乎对这一举措感到困惑 ?；不只是用户，一位 [谷歌的内核网络开发人员](https://lkml.org/lkml/2022/11/23/1502) 也提出了这个议题，但我们还没有看到对此的回应。


**但不是每个人都使用主线 Linux 内核？如果你不想受到这种变化的影响，你是否应该坚持使用 LTS 版本的内核？**


此外，用户希望更清楚地了解这是否会影响到所有人。


但是，从目前来看，Greg 可能并没有给出更多的细节来说服一些相关用户。


? 当然，我们不是 Linux 内核维护者。所以，最好等这个提交通过时，我希望 Linux 内核维护者能比我们知道更多的信息。


? 你对这个计划中的 Linux 内核的变化有什么看法？请在下面的评论中分享你的想法。




---


via: <https://news.itsfoss.com/linux-disable-microsoft-rndis/>


作者：[Sourav Rudra](https://news.itsfoss.com/author/sourav/) 选题：[lkxed](https://github.com/lkxed) 译者：[wxy](https://github.com/wxy) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
![](/assets/images/pikapods-banner-v3.webp)


![](/assets/images/pikapods-banner-v3.webp)

Microsoft's RNDIS protocol, short for Remote Network Driver Interface Specification, is a proprietary USB protocol for virtual Ethernet functionality on computers.

The most common use case of this would be using your phone's mobile network to connect to the internet on your computer via USB, also known as [Tethering](https://en.wikipedia.org/wiki/Tethering?ref=news.itsfoss.com).

Even though it mainly works on Windows, it has been part of the Linux kernel for a while now.

But that is set to change soon.

## Say Goodbye to RNDIS Protocol?

![](https://news.itsfoss.com/content/images/2023/01/kernel-patch-rndis.jpg)

**What is happening?: **On Monday, [Greg Kroah-Hartman](https://twitter.com/gregkh?ref=news.itsfoss.com) created the [usb.git rndis-removal](https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/commit/?h=rndis-removal&id=5eb127bb9741c1480aff95ffa4e1bd4cd9b5b16d&ref=news.itsfoss.com) branch, where he mentions disabling the implementation of all RNDIS protocol drivers on Linux.

With the commit, he mentions:

The Microsoft RNDIS protocol is, as designed, insecure and vulnerable on

any system that uses it with untrusted hosts or devices. Because the

protocol is impossible to make secure, just disable all rndis drivers to

prevent anyone from using them again.

Windows only needed this for XP and newer systems, Windows systems older than that can use the normal USB class protocols instead, which do not have these problems.

Android has had this disabled for many years so there should not be any

real systems that still need this.

As initially reported by [Phoronix](https://www.phoronix.com/news/Linux-Disabling-RNDIS-Drivers?ref=news.itsfoss.com), once this protocol is marked 'BROKEN' in the Kconfig option, it will stay there for a while and ultimately be removed from the kernel.

But **why?**

The implementation of RNDIS is known to be a mess on platforms apart from Windows and poses quite a few security risks. In addition, RNDIS is not being used as widely as before, and the security risks it presents might be one of the main reasons for this decision.

**Does this have an impact on current users? Should you be worried?**

If we look at a [Reddit thread](https://www.reddit.com/r/linux/comments/108avzx/linux_preparing_to_disable_drivers_for_microsofts/?ref=news.itsfoss.com) discussing this upcoming change, we would see that many users remain curious **if this would break USB tethering for everyone.**

Users seem confused about this move, considering many Android phones still use RNDIS instead of CDC NCM (a newer protocol) 😕 Not just users; a [Kernel Networking Developer at Google](https://lkml.org/lkml/2022/11/23/1502?ref=news.itsfoss.com) also flagged this issue, but we do not see a response to that yet.

**But not everyone uses mainline Linux Kernel? Should you stick to an LTS version of the kernel if you do not want to be impacted by this change?**

Furthermore, users wanted more clarity on how this does not impact everyone.

But, as of now, **Greg** may not have mentioned a lot of details to convince some of the concerned users.

🤔 Of course, we aren't Linux Kernel maintainers. So, it is best to wait until this commit gets through, and I hope that the Linux Kernel maintainers shed more light on it than we already know.

💭 *What are your thoughts on this planned change for the Linux Kernel? Share your thoughts in the comments down below.*

## More from It's FOSS...

- Support us by opting for
[It's FOSS Plus](https://itsfoss.com/#/portal/signup)membership. - Join our
[community forum](https://itsfoss.community/). - 📩 Stay updated with the latest on Linux and Open Source. Get our
[weekly Newsletter](https://itsfoss.com/newsletter/).