lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20260114095434.148984-1-zwq2226404116@163.com>
Date: Wed, 14 Jan 2026 17:54:34 +0800
From: "wanquan.zhong" <zwq2226404116@....com>
To: chandrashekar.devegowda@...el.com,
	chiranjeevi.rapolu@...ux.intel.com,
	haijun.liu@...iatek.com,
	ricardo.martinez@...ux.intel.com
Cc: netdev@...r.kernel.org,
	loic.poulain@....qualcomm.com,
	ryazanov.s.a@...il.com,
	johannes@...solutions.net,
	davem@...emloft.net,
	andrew+netdev@...n.ch,
	kuba@...nel.org,
	pabeni@...hat.com,
	linux-kernel@...r.kernel.org,
	"wanquan.zhong" <wanquan.zhong@...ocom.com>
Subject: [PATCH] [PATCH v2] wwan: t7xx: Add CONFIG_WWAN_ADB_PORT to control ADB debug port

From: "wanquan.zhong" <wanquan.zhong@...ocom.com>

Add a new Kconfig option for MediaTek T7xx WWAN devices, to
conditionally enable the ADB debug port functionality. This option:
- Depends on MTK_T7XX (specific to MediaTek T7xx devices)
- Defaults to 'y', as disabling it may cause difficulties for T7xx
debugging
- Requires EXPERT to be visible (to avoid accidental enablement)

In t7xx_port_proxy.c, wrap the ADB port configuration struct with
CONFIG_WWAN_ADB_PORT, so the port is only exposed when
the config is explicitly enabled.

This addresses security concerns in certain systems (e.g., Google
Chrome OS)where root privileges could potentially trigger ADB
configuration of WWAN devices.Note that only ADB port is restricted
while MIPC port remains unrestricted,as MIPC is MTK's internal
protocol port with no security risks.

While using a kernel config option for a single array element in t7xx may
seem like resource overhead, this is the most straightforward
implementation approach. Alternative implementation suggestions are
welcome.

Signed-off-by: wanquan.zhong <wanquan.zhong@...ocom.com>
---
 drivers/net/wwan/Kconfig                | 12 ++++++++++++
 drivers/net/wwan/t7xx/t7xx_port_proxy.c |  2 ++
 2 files changed, 14 insertions(+)

diff --git a/drivers/net/wwan/Kconfig b/drivers/net/wwan/Kconfig
index 410b0245114e..ef36a49cc85c 100644
--- a/drivers/net/wwan/Kconfig
+++ b/drivers/net/wwan/Kconfig
@@ -26,6 +26,18 @@ config WWAN_DEBUGFS
 	  If this option is selected, then you can find the debug interface
 	  elements for each WWAN device in a directory that is corresponding to
 	  the device name: debugfs/wwan/wwanX.
+config WWAN_ADB_PORT
+	bool "MediaTek T7xx ADB port support" if EXPERT
+	depends on MTK_T7XX
+	default y
+	help
+	  Enables ADB (Android Debug Bridge) debug port support for MediaTek T7xx WWAN devices.
+
+	  This option enables the ADB debug port functionality in the MediaTek T7xx driver,
+	  allowing Android Debug Bridge connections through T7xx modems that support
+	  this feature. It is primarily used for debugging and development purposes.
+
+	  If unsure, say Y.
 
 config WWAN_HWSIM
 	tristate "Simulated WWAN device"
diff --git a/drivers/net/wwan/t7xx/t7xx_port_proxy.c b/drivers/net/wwan/t7xx/t7xx_port_proxy.c
index 4fc131f9632f..9f3b7b1dd4e2 100644
--- a/drivers/net/wwan/t7xx/t7xx_port_proxy.c
+++ b/drivers/net/wwan/t7xx/t7xx_port_proxy.c
@@ -102,6 +102,7 @@ static const struct t7xx_port_conf t7xx_port_conf[] = {
 		.ops = &ctl_port_ops,
 		.name = "t7xx_ap_ctrl",
 	}, {
+#ifdef CONFIG_WWAN_ADB_PORT
 		.tx_ch = PORT_CH_AP_ADB_TX,
 		.rx_ch = PORT_CH_AP_ADB_RX,
 		.txq_index = Q_IDX_ADB,
@@ -112,6 +113,7 @@ static const struct t7xx_port_conf t7xx_port_conf[] = {
 		.port_type = WWAN_PORT_ADB,
 		.debug = true,
 	}, {
+#endif
 		.tx_ch = PORT_CH_MIPC_TX,
 		.rx_ch = PORT_CH_MIPC_RX,
 		.txq_index = Q_IDX_MBIM_MIPC,
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ