The Linux kernel recently resolved an important vulnerability that primarily affected Nvidia's Tegra MGBE controllers. The vulnerability is centered around the need for the IOMMU "Stream ID" (SID) to be written to the MGBE_WRAP_AXI_ASID_CTRL register. This is a crucial measure to maintain the system's stability and prevent issues such as softirq timeouts and kernel panics, which can cause disruptions.
The core problem with the vulnerability can be traced back to the fact that the existing driver is hardcoded to use MGBE's SID for all controllers. Consequently, when a device other than MGBE is utilized, this can result in significant issues. The dmesg errors given below exemplify what happens when an ethernet cable is connected to MGBE1:
[ 116.133290] tegra-mgbe 691000.ethernet eth1: Link is Up - 1Gbps/Full - flow control rx/tx
[ 121.851283] tegra-mgbe 691000.ethernet eth1: NETDEV WATCHDOG: CPU: 5: transmit queue timed out 569 ms
[ 121.851782] tegra-mgbe 691000.ethernet eth1: Reset adapter.
[ 121.892464] tegra-mgbe 691000.ethernet eth1: Register MEM_TYPE_PAGE_POOL RxQ-
[ 121.905920] tegra-mgbe 691000.ethernet eth1: PHY [stmmac-1:00] driver [Aquantia AQR113] (irq=171)
[ 121.907356] tegra-mgbe 691000.ethernet eth1: Enabling Safety Features
[ 121.907578] tegra-mgbe 691000.ethernet eth1: IEEE 1588-2008 Advanced Timestamp supported
[ 121.908399] tegra-mgbe 691000.ethernet eth1: registered PTP clock
[ 121.908582] tegra-mgbe 691000.ethernet eth1: configuring for phy/10gbase-r link mode
[ 125.961292] tegra-mgbe 691000.ethernet eth1: Link is Up - 1Gbps/Full - flow control rx/tx
[ 181.921198] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
[ 181.921404] rcu: 7-....: (1 GPs behind) idle=540c/1/x4000000000000002 softirq=1748/1749 fqs=2337
---truncated---
Fortunately, the Linux kernel engineers have worked diligently to resolve this issue by ensuring that the correct SID is read from the device tree. For further information regarding this vulnerability and mitigation measures, refer to the official Linux kernel documentation.
It is vital for users and administrators working with Nvidia Tegra MGBE controllers to be aware of this vulnerability and ensure that their systems are updated with the latest patches to avoid potential issues. By staying informed and proactive, it is possible to maintain a secure and stable environment for your devices.
Timeline
Published on: 01/21/2025 13:15:09 UTC